Commit 480247c58fa4dc84e1d5d00cfc0146f9589bac81
1 parent
66707ca9
Exists in
master
and in
28 other branches
catalog-tests: fix per page value and remove obsolete test
Showing
1 changed file
with
1 additions
and
20 deletions
Show diff stats
test/functional/catalog_controller_test.rb
| ... | ... | @@ -47,7 +47,7 @@ class CatalogControllerTest < ActionController::TestCase |
| 47 | 47 | |
| 48 | 48 | assert_equal 12, @enterprise.products.count |
| 49 | 49 | get :index, :profile => @enterprise.identifier |
| 50 | - assert_equal 9, assigns(:products).count | |
| 50 | + assert_equal 6, assigns(:products).count | |
| 51 | 51 | assert_tag :a, :attributes => {:class => 'next_page'} |
| 52 | 52 | end |
| 53 | 53 | |
| ... | ... | @@ -170,25 +170,6 @@ class CatalogControllerTest < ActionController::TestCase |
| 170 | 170 | assert_tag :tag => 'img', :attributes => { :class => 'star', :src => /star.png/ } |
| 171 | 171 | end |
| 172 | 172 | |
| 173 | - should 'display categories and sub-categories link' do | |
| 174 | - pc1 = ProductCategory.create!(:name => "PC1", :environment => @enterprise.environment) | |
| 175 | - pc2 = ProductCategory.create!(:name => "PC2", :environment => @enterprise.environment, :parent_id => pc1.id) | |
| 176 | - pc3 = ProductCategory.create!(:name => "PC3", :environment => @enterprise.environment, :parent_id => pc1.id) | |
| 177 | - pc4 = ProductCategory.create!(:name => "PC4", :environment => @enterprise.environment, :parent_id => pc2.id) | |
| 178 | - p1 = fast_create(Product, :product_category_id => pc1.id, :profile_id => @enterprise.id) | |
| 179 | - p2 = fast_create(Product, :product_category_id => pc2.id, :profile_id => @enterprise.id) | |
| 180 | - p3 = fast_create(Product, :product_category_id => pc3.id, :profile_id => @enterprise.id) | |
| 181 | - p4 = fast_create(Product, :product_category_id => pc4.id, :profile_id => @enterprise.id) | |
| 182 | - | |
| 183 | - get :index, :profile => @enterprise.identifier | |
| 184 | - | |
| 185 | - assert_tag :tag => 'a', :attributes => {:href => /level=#{pc1.id}/} | |
| 186 | - assert_tag :tag => 'a', :attributes => {:href => /level=#{pc2.id}/} | |
| 187 | - assert_tag :tag => 'a', :attributes => {:href => /level=#{pc3.id}/} | |
| 188 | - assert_no_tag :tag => 'a', :attributes => {:href => /level=#{pc4.id}/} | |
| 189 | - end | |
| 190 | - | |
| 191 | - | |
| 192 | 173 | should 'display categories on breadcrumb' do |
| 193 | 174 | pc1 = ProductCategory.create!(:name => "PC1", :environment => @enterprise.environment) |
| 194 | 175 | pc2 = ProductCategory.create!(:name => "PC2", :environment => @enterprise.environment, :parent_id => pc1.id) | ... | ... |