From 3fcda8daec6efdd6b0681550c4c4f7b09f4d2b2a Mon Sep 17 00:00:00 2001 From: Jeremy Lenz Date: Mon, 5 Feb 2024 09:54:52 -0500 Subject: [PATCH] Refs #37140 - fix some tests --- .../katello/api/v2/organizations_controller.rb | 4 +--- .../katello/organization_creator_test.rb | 16 ---------------- .../scenes/Subscriptions/SubscriptionsPage.js | 2 +- 3 files changed, 2 insertions(+), 20 deletions(-) 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) diff --git a/webpack/scenes/Subscriptions/SubscriptionsPage.js b/webpack/scenes/Subscriptions/SubscriptionsPage.js index 232a4d6cecc..604b45ecc39 100644 --- a/webpack/scenes/Subscriptions/SubscriptionsPage.js +++ b/webpack/scenes/Subscriptions/SubscriptionsPage.js @@ -5,7 +5,7 @@ import Immutable from 'seamless-immutable'; import { translate as __ } from 'foremanReact/common/I18n'; import { propsToCamelCase } from 'foremanReact/common/helpers'; import { isEmpty } from 'lodash'; -import { Grid, Row, Col, Alert } from 'patternfly-react'; +import { Grid, Row, Col } from 'patternfly-react'; import { Popover, Flex, FlexItem } from '@patternfly/react-core'; import { OutlinedQuestionCircleIcon } from '@patternfly/react-icons'; import ModalProgressBar from 'foremanReact/components/common/ModalProgressBar';