From 126613b1059b30646b64d27570108642a601a17e Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Mon, 23 Mar 2015 15:07:36 -0300 Subject: [PATCH] Remove integration test for deprecated layout --- test/integration/categories_menu_test.rb | 41 ----------------------------------------- 1 file changed, 0 insertions(+), 41 deletions(-) delete mode 100644 test/integration/categories_menu_test.rb diff --git a/test/integration/categories_menu_test.rb b/test/integration/categories_menu_test.rb deleted file mode 100644 index ed6a8eb..0000000 --- a/test/integration/categories_menu_test.rb +++ /dev/null @@ -1,41 +0,0 @@ -require_relative "../test_helper" - -class CategoriesMenuTest < ActionController::IntegrationTest - - def setup - HomeController.any_instance.stubs(:get_layout).returns('application') - SearchController.any_instance.stubs(:get_layout).returns('application') - - Category.delete_all - @cat1 = Category.create!(:display_in_menu => true, :name => 'Food', :environment => Environment.default, :display_color => '#888a85') - @cat2 = Category.create!(:display_in_menu => true, :name => 'Vegetables', :environment => Environment.default, :parent => @cat1) - - # all categories must be shown for these tests - Category.any_instance.stubs(:display_in_menu?).returns(true) - end - - should 'display link to categories' do - get '/' - assert_tag :attributes => { :id => 'cat_menu' }, :descendant => { :tag => 'a', :attributes => { :href => '/cat/food/vegetables' } } - end - - should 'display link to sub-categories' do - get '/cat/food' - # there must be a link to the subcategory - assert_tag :attributes => { :id => 'cat_menu' }, :descendant => { :tag => 'a', :attributes => { :href => '/cat/food/vegetables' } } - end - - should "always link to category's initial page in category menu" do - get '/search/products/food/vegetables' - assert_tag :attributes => { :id => 'cat_menu' }, :descendant => { :tag => 'a', :attributes => { :href => '/cat/food/vegetables' } } - assert_no_tag :attributes => { :id => 'cat_menu' }, :descendant => { :tag => 'a', :attributes => { :href => '/searchh/products/food/vegetables' } } - end - - should 'cache the categories menu' do - ActionController::Base.perform_caching = true - HomeController.any_instance.stubs(:fragment_cache_key).with(Environment.default.id.to_s + "_categories_menu").returns('dir') - get '/' - ActionController::Base.perform_caching = false - end - -end -- libgit2 0.21.2