Sha256: b330b523ad42a60cbb6492c48e46bdbf573fe0d58370ad730a3003e84e1358c6

Contents?: true

Size: 565 Bytes

Versions: 62

Compression:

Stored size: 565 Bytes

Contents

require 'test_helper'

module Workarea
  class IndexProductRuleTest < TestCase
    include TestCase::SearchIndexing

    def test_find_product_list_from_rule
      Sidekiq::Callbacks.enable IndexProductRule do
        product = create_product(name: 'Categorize This')
        category = create_category
        category.product_rules.create!(
          { name: 'search', operator: 'equals', value: 'Categorize' }
        )
        categorization = Categorization.new(product)

        assert_includes(categorization.to_models, category)
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.4.13 test/workers/workarea/index_product_rule_test.rb
workarea-core-3.4.12 test/workers/workarea/index_product_rule_test.rb