diff --git a/test/controllers/api/v2/host_subscriptions_controller_test.rb b/test/controllers/api/v2/host_subscriptions_controller_test.rb index 7ff5ca61197..faf9f0f7298 100644 --- a/test/controllers/api/v2/host_subscriptions_controller_test.rb +++ b/test/controllers/api/v2/host_subscriptions_controller_test.rb @@ -274,8 +274,6 @@ def test_find_content_overrides_with_empty_string_search_limited_to_environment end def test_find_content_overrides_with_inverse_search_limited_to_environment_with_structured_apt - # enable structured_apt - Foreman.settings.set_user_value('deb_enable_structured_apt', true) # Create Host with "deb" as content content_view = katello_content_views(:library_dev_view) library = katello_environments(:library) @@ -286,14 +284,9 @@ def test_find_content_overrides_with_inverse_search_limited_to_environment_with_ host = FactoryBot.create(:host, :with_content, :with_subscription, :content_view => content_view, :lifecycle_environment => library, :organization => content_view.organization) - # Get content_id and label of first product of host - products = ::Katello::Content.joins(:product_contents) - .where("#{Katello::ProductContent.table_name}.product_id": host.organization.products.subscribable.enabled) - in_env_id = products.pluck(:content_id)[2] - # Create fake product with content_id and stub ProductContentFinder content = katello_contents(:deb_content_v1) - pc = [FactoryBot.build(:katello_product_content, content: content, content_id: in_env_id)] + pc = [FactoryBot.build(:katello_product_content, content: content)] ProductContentFinder.any_instance.stubs(:product_content).returns(pc) controller = ::Katello::Api::V2::HostSubscriptionsController.new