From 480247c58fa4dc84e1d5d00cfc0146f9589bac81 Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Wed, 29 Jan 2014 18:02:08 -0300 Subject: [PATCH] catalog-tests: fix per page value and remove obsolete test --- test/functional/catalog_controller_test.rb | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/test/functional/catalog_controller_test.rb b/test/functional/catalog_controller_test.rb index f3f758e..ac9aa8b 100644 --- a/test/functional/catalog_controller_test.rb +++ b/test/functional/catalog_controller_test.rb @@ -47,7 +47,7 @@ class CatalogControllerTest < ActionController::TestCase assert_equal 12, @enterprise.products.count get :index, :profile => @enterprise.identifier - assert_equal 9, assigns(:products).count + assert_equal 6, assigns(:products).count assert_tag :a, :attributes => {:class => 'next_page'} end @@ -170,25 +170,6 @@ class CatalogControllerTest < ActionController::TestCase assert_tag :tag => 'img', :attributes => { :class => 'star', :src => /star.png/ } end - should 'display categories and sub-categories link' do - pc1 = ProductCategory.create!(:name => "PC1", :environment => @enterprise.environment) - pc2 = ProductCategory.create!(:name => "PC2", :environment => @enterprise.environment, :parent_id => pc1.id) - pc3 = ProductCategory.create!(:name => "PC3", :environment => @enterprise.environment, :parent_id => pc1.id) - pc4 = ProductCategory.create!(:name => "PC4", :environment => @enterprise.environment, :parent_id => pc2.id) - p1 = fast_create(Product, :product_category_id => pc1.id, :profile_id => @enterprise.id) - p2 = fast_create(Product, :product_category_id => pc2.id, :profile_id => @enterprise.id) - p3 = fast_create(Product, :product_category_id => pc3.id, :profile_id => @enterprise.id) - p4 = fast_create(Product, :product_category_id => pc4.id, :profile_id => @enterprise.id) - - get :index, :profile => @enterprise.identifier - - assert_tag :tag => 'a', :attributes => {:href => /level=#{pc1.id}/} - assert_tag :tag => 'a', :attributes => {:href => /level=#{pc2.id}/} - assert_tag :tag => 'a', :attributes => {:href => /level=#{pc3.id}/} - assert_no_tag :tag => 'a', :attributes => {:href => /level=#{pc4.id}/} - end - - should 'display categories on breadcrumb' do pc1 = ProductCategory.create!(:name => "PC1", :environment => @enterprise.environment) pc2 = ProductCategory.create!(:name => "PC2", :environment => @enterprise.environment, :parent_id => pc1.id) -- libgit2 0.21.2