|
|
@ -8,29 +8,29 @@ |
|
|
|
# |
|
|
|
# |
|
|
|
# See doc/COPYRIGHT.rdoc for more details. |
|
|
|
# See doc/COPYRIGHT.rdoc for more details. |
|
|
|
#++ |
|
|
|
#++ |
|
|
|
|
|
|
|
# |
|
|
|
require File.expand_path('../../spec_helper', __FILE__) |
|
|
|
# require File.expand_path('../../spec_helper', __FILE__) |
|
|
|
|
|
|
|
# |
|
|
|
describe DefaultPlanningElementType do |
|
|
|
# describe DefaultPlanningElementType do |
|
|
|
describe '- Relations ' do |
|
|
|
# describe '- Relations ' do |
|
|
|
it 'can read the project_type w/ the help of the belongs_to association' do |
|
|
|
# it 'can read the project_type w/ the help of the belongs_to association' do |
|
|
|
project_type = FactoryGirl.create(:project_type) |
|
|
|
# project_type = FactoryGirl.create(:project_type) |
|
|
|
default_planning_element_type = FactoryGirl.create(:default_planning_element_type, |
|
|
|
# default_planning_element_type = FactoryGirl.create(:default_planning_element_type, |
|
|
|
:project_type_id => project_type.id) |
|
|
|
# :project_type_id => project_type.id) |
|
|
|
|
|
|
|
# |
|
|
|
default_planning_element_type.reload |
|
|
|
# default_planning_element_type.reload |
|
|
|
|
|
|
|
# |
|
|
|
default_planning_element_type.project_type.should == project_type |
|
|
|
# default_planning_element_type.project_type.should == project_type |
|
|
|
end |
|
|
|
# end |
|
|
|
|
|
|
|
# |
|
|
|
it 'can read the planning_element_type w/ the help of the belongs_to association' do |
|
|
|
# it 'can read the planning_element_type w/ the help of the belongs_to association' do |
|
|
|
planning_element_type = FactoryGirl.create(:planning_element_type) |
|
|
|
# planning_element_type = FactoryGirl.create(:planning_element_type) |
|
|
|
default_planning_element_type = FactoryGirl.create(:default_planning_element_type, |
|
|
|
# default_planning_element_type = FactoryGirl.create(:default_planning_element_type, |
|
|
|
:planning_element_type_id => planning_element_type.id) |
|
|
|
# :planning_element_type_id => planning_element_type.id) |
|
|
|
|
|
|
|
# |
|
|
|
default_planning_element_type.reload |
|
|
|
# default_planning_element_type.reload |
|
|
|
|
|
|
|
# |
|
|
|
default_planning_element_type.planning_element_type.should == planning_element_type |
|
|
|
# default_planning_element_type.planning_element_type.should == planning_element_type |
|
|
|
end |
|
|
|
# end |
|
|
|
end |
|
|
|
# end |
|
|
|
end |
|
|
|
# end |
|
|
|