Commit ada102788b63a466ac9bfed732eb4815b72d7901

Authored by Braulio Bhavamitra
1 parent f2713b75

products: fix random failing test

Showing 1 changed file with 3 additions and 3 deletions   Show diff stats
plugins/products/test/unit/profile_test.rb
... ... @@ -22,9 +22,8 @@ class ProfileTest < ActiveSupport::TestCase
22 22 end
23 23  
24 24 should 'collect the highlighted products with image' do
25   - env = Environment.default
26 25 e1 = fast_create(Enterprise)
27   - p1 = create(Product, name: 'test_prod1', product_category_id: @product_category.id, enterprise: e1)
  26 + create(Product, name: 'test_prod1', product_category_id: @product_category.id, enterprise: e1)
28 27 products = []
29 28 3.times {|n|
30 29 products.push(create(Product, name: "product #{n}", profile_id: e1.id,
... ... @@ -36,7 +35,8 @@ class ProfileTest < ActiveSupport::TestCase
36 35 create(Product, name: "product 5", profile_id: e1.id, product_category_id: @product_category.id, image_builder: {
37 36 uploaded_data: fixture_file_upload('/files/rails.png', 'image/png')
38 37 })
39   - assert_equal products, e1.highlighted_products_with_image
  38 +
  39 + assert_equivalent products, e1.highlighted_products_with_image
40 40 end
41 41  
42 42 should 'have many inputs through products' do
... ...