Commit 72d90efda49fab7809129882df6d3e86bcff9868

Authored by Braulio Bhavamitra
2 parents 315ed27e ada10278

Merge branch 'products-fixes' into noosfero

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
... ...
plugins/products/views/profile_editor/_products_profile_info_contents.html.slim 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +- if profile.enterprise?
  2 + h2= _('Products/Services catalog')
  3 + = labelled_form_field(_('Number of products/services displayed per page on catalog'), text_field(:profile_data, :products_per_catalog_page, size: 3))
... ...
plugins/products/views/profile_editor/products_profile_info_contents.html.slim
... ... @@ -1,3 +0,0 @@
1   -- if profile.enterprise?
2   - h2= _('Products/Services catalog')
3   - = labelled_form_field(_('Number of products/services displayed per page on catalog'), text_field(:profile_data, :products_per_catalog_page, size: 3))