Removes facrories and specs for obsolete models.

This removes factories and specs for DefaultPlanningElementTypes and
EnabledPlanningElementTypes.
pull/1203/head
Martin Czuchra 11 years ago
parent f3130ac07f
commit f5784c0d43
  1. 12
      spec/factories/default_planning_element_type_factory.rb
  2. 12
      spec/factories/enabled_planning_element_type_factory.rb
  3. 52
      spec/models/default_planning_element_type_spec.rb
  4. 52
      spec/models/enabled_planning_element_type_spec.rb

@ -9,9 +9,9 @@
# See doc/COPYRIGHT.rdoc for more details.
#++
FactoryGirl.define do
factory(:default_planning_element_type, :class => DefaultPlanningElementType) do
project_type { |e| e.association(:project_type) }
planning_element_type { |e| e.association(:planning_element_type) }
end
end
# FactoryGirl.define do
# factory(:default_planning_element_type, :class => DefaultPlanningElementType) do
# project_type { |e| e.association(:project_type) }
# planning_element_type { |e| e.association(:planning_element_type) }
# end
# end

@ -9,9 +9,9 @@
# See doc/COPYRIGHT.rdoc for more details.
#++
FactoryGirl.define do
factory(:enabled_planning_element_type, :class => EnabledPlanningElementType) do
project { |e| e.association(:project) }
planning_element_type { |e| e.association(:planning_element_type) }
end
end
# FactoryGirl.define do
# factory(:enabled_planning_element_type, :class => EnabledPlanningElementType) do
# project { |e| e.association(:project) }
# planning_element_type { |e| e.association(:planning_element_type) }
# end
# end

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

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

Loading…
Cancel
Save