Sha256: 5203e37dd72016e36dde37939ea8ebd9626006c8b4fa93b737a577518ca22109

Contents?: true

Size: 488 Bytes

Versions: 62

Compression:

Stored size: 488 Bytes

Contents

require 'test_helper'

module Workarea
  class CleanProductRecommendationsTest < TestCase
    def test_perform
      predictor = Recommendation::ProductPredictor.new
      predictor.orders.add_set('order_id', %w(product_one product_two))
      predictor.process!
      assert_equal(%w(product_two), predictor.similarities_for('product_one'))

      CleanProductRecommendations.new.perform('product_two')
      assert_equal([], predictor.similarities_for('product_one'))
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

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