Project

General

Profile

« Previous | Next » 

Revision 390b6a72

Added by Eric Helms over 10 years ago

Namespacing Katello factories and updating duplicated factories to modify
existing ones from Foreman. Addresses the test failures introduced
by Foreman PR #1070.

View differences:

spec/models/environment_spec.rb
@third_product = Product.create!(:name =>"prod3", :label=> "prrod3",:cp_id => '45678', :provider => @provider)
@fourth_product = Product.create!(:name =>"prod4", :label => "prod4", :cp_id => '32683', :provider => @provider)
@environment = create_environment({:name=>@env_name, :organization => @organization, :label=> @env_name, :prior => @organization.library})
FactoryGirl.create(:repository, product: @first_product, environment: @environment,
FactoryGirl.create(:katello_repository, product: @first_product, environment: @environment,
content_view_version_id: @environment.content_view_versions.first.id)
FactoryGirl.create(:repository, product: @third_product, environment: @environment,
FactoryGirl.create(:katello_repository, product: @third_product, environment: @environment,
content_view_version_id: @environment.content_view_versions.first.id)
end
......
@prior_env = create_environment(:name=>@environment.name + '-prior', :label=> @environment.name + '-prior',
:prior => @environment.id, :organization => @organization)
FactoryGirl.create(:repository, environment: @prior_env, product: @first_product,
FactoryGirl.create(:katello_repository, environment: @prior_env, product: @first_product,
content_view_version_id: @prior_env.content_view_versions.first.id)
FactoryGirl.create(:repository, environment: @prior_env, product: @second_product,
FactoryGirl.create(:katello_repository, environment: @prior_env, product: @second_product,
content_view_version_id: @prior_env.content_view_versions.first.id)
FactoryGirl.create(:repository, environment: @prior_env, product: @third_product,
FactoryGirl.create(:katello_repository, environment: @prior_env, product: @third_product,
content_view_version_id: @prior_env.content_view_versions.first.id)
FactoryGirl.create(:repository, environment: @organization.library, product: @first_product,
FactoryGirl.create(:katello_repository, environment: @organization.library, product: @first_product,
content_view_version_id: @organization.library.content_view_versions.first.id)
FactoryGirl.create(:repository, environment: @organization.library, product: @second_product,
FactoryGirl.create(:katello_repository, environment: @organization.library, product: @second_product,
content_view_version_id: @organization.library.content_view_versions.first.id)
FactoryGirl.create(:repository, environment: @organization.library, product: @third_product,
FactoryGirl.create(:katello_repository, environment: @organization.library, product: @third_product,
content_view_version_id: @organization.library.content_view_versions.first.id)
FactoryGirl.create(:repository, environment: @organization.library, product: @fourth_product,
FactoryGirl.create(:katello_repository, environment: @organization.library, product: @fourth_product,
content_view_version_id: @organization.library.content_view_versions.first.id)
end

Also available in: Unified diff