[noosfero/noosfero][master] Remove integration test for deprecated layout

Antonio Terceiro gitlab at gitlab.com
Mon Mar 23 15:10:56 BRT 2015


Antonio Terceiro pushed to master at Noosfero / noosfero


Commits:
126613b1 by Antonio Terceiro at 2015-03-23T15:07:36Z
Remove integration test for deprecated layout

- - - - -


1 changed file:

- − test/integration/categories_menu_test.rb


Changes:

=====================================
test/integration/categories_menu_test.rb deleted
=====================================
--- 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


View it on GitLab: https://gitlab.com/noosfero/noosfero/commit/126613b1059b30646b64d27570108642a601a17e
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20150323/41294f87/attachment.html>


More information about the Noosfero-dev mailing list