Sha256: ba41015c25e336af7817c424a2b78a7faf1a28f1b4ab799b785ecf5c10eebf8e

Contents?: true

Size: 802 Bytes

Versions: 62

Compression:

Stored size: 802 Bytes

Contents

require 'test_helper'

module Workarea
  module Admin
    class RecommendationsIntegrationTest < Workarea::IntegrationTest
      include Admin::IntegrationTest

      setup :set_product

      def set_product
        @product = create_product
      end

      def test_updates_product_recommendations_settings
        patch admin.catalog_product_recommendations_path(@product),
          params: {
            sources: %w(automatic custom),
            settings: { product_ids_list: '1,2,3' }
          }

        assert_equal(1, Recommendation::Settings.count)
        settings = Recommendation::Settings.first
        assert_equal(@product.id, settings.id)
        assert_equal(%w(automatic custom), settings.sources)
        assert_equal(%w(1 2 3), settings.product_ids)
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-admin-3.5.27 test/integration/workarea/admin/recommendations_integration_test.rb
workarea-admin-3.5.26 test/integration/workarea/admin/recommendations_integration_test.rb
workarea-admin-3.4.45 test/integration/workarea/admin/recommendations_integration_test.rb
workarea-admin-3.5.25 test/integration/workarea/admin/recommendations_integration_test.rb
workarea-admin-3.5.23 test/integration/workarea/admin/recommendations_integration_test.rb
workarea-admin-3.4.44 test/integration/workarea/admin/recommendations_integration_test.rb
workarea-admin-3.5.22 test/integration/workarea/admin/recommendations_integration_test.rb
workarea-admin-3.4.43 test/integration/workarea/admin/recommendations_integration_test.rb
workarea-admin-3.5.21 test/integration/workarea/admin/recommendations_integration_test.rb
workarea-admin-3.4.42 test/integration/workarea/admin/recommendations_integration_test.rb
workarea-admin-3.5.20 test/integration/workarea/admin/recommendations_integration_test.rb
workarea-admin-3.4.41 test/integration/workarea/admin/recommendations_integration_test.rb
workarea-admin-3.5.19 test/integration/workarea/admin/recommendations_integration_test.rb
workarea-admin-3.4.40 test/integration/workarea/admin/recommendations_integration_test.rb
workarea-admin-3.5.18 test/integration/workarea/admin/recommendations_integration_test.rb
workarea-admin-3.4.39 test/integration/workarea/admin/recommendations_integration_test.rb
workarea-admin-3.5.17 test/integration/workarea/admin/recommendations_integration_test.rb
workarea-admin-3.4.38 test/integration/workarea/admin/recommendations_integration_test.rb
workarea-admin-3.5.16 test/integration/workarea/admin/recommendations_integration_test.rb
workarea-admin-3.4.37 test/integration/workarea/admin/recommendations_integration_test.rb