diff --git a/app/controllers/katello/api/v2/organizations_controller.rb b/app/controllers/katello/api/v2/organizations_controller.rb index 27f9102dbd0..b79e8f947bc 100644 --- a/app/controllers/katello/api/v2/organizations_controller.rb +++ b/app/controllers/katello/api/v2/organizations_controller.rb @@ -80,11 +80,9 @@ def update param :organization, Hash do param :label, String, :required => false end - param :simple_content_access, :bool, :desc => N_('Whether to turn on Simple Content Access for the organization.'), :required => false, :default => true, deprecated: true def create @organization = Organization.new(resource_params) - sca = params.key?(:simple_content_access) ? ::Foreman::Cast.to_bool(params[:simple_content_access]) : true - creator = ::Katello::OrganizationCreator.new(@organization, sca: sca) + creator = ::Katello::OrganizationCreator.new(@organization) creator.create! @organization.reload # @taxonomy instance variable is necessary for foreman side diff --git a/test/services/katello/organization_creator_test.rb b/test/services/katello/organization_creator_test.rb index 9ff51422055..9168c97ee78 100644 --- a/test/services/katello/organization_creator_test.rb +++ b/test/services/katello/organization_creator_test.rb @@ -53,22 +53,6 @@ def test_create validate_creator(creator) end - def test_create_with_sca_off - org = FactoryBot.build(:organization) - creator = Katello::OrganizationCreator.new(org, sca: false) - - Katello::Ping.expects(:ping!).returns(true) - org.expects(:candlepin_owner_exists?).returns(false) - Katello::Resources::Candlepin::Owner.expects(:create).with(org.name, org.name, content_access_mode: 'entitlement').returns(true) - Katello::Resources::Candlepin::Owner.expects(:get_ueber_cert).returns(true) - Katello::ContentViewEnvironment.any_instance.expects(:exists_in_candlepin?).returns(false) - Katello::Resources::Candlepin::Environment.expects(:create).returns(true) - - creator.create! - validate_org(org) - validate_creator(creator) - end - def test_create_rollback org = FactoryBot.build(:organization, name: 'rollback_org') creator = Katello::OrganizationCreator.new(org)