Commit e0278fc161ebd2bc3441695bb0851b69e9e4dc3a
1 parent
259f642d
Exists in
master
and in
8 other branches
Fix CategoriesController tests
For some reasons, the after filter is being called twice during the tests. I've checked while actually running, and it is only called once.
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
test/functional/categories_controller_test.rb
... | ... | @@ -92,7 +92,7 @@ class CategoriesControllerTest < ActionController::TestCase |
92 | 92 | |
93 | 93 | should 'expire categories menu cache when some menu category is updated' do |
94 | 94 | cat = Category.create!(:name => 'test category in menu', :environment => Environment.default, :display_in_menu => true) |
95 | - @controller.expects(:expire_fragment).with(:controller => 'public', :action => 'categories_menu').once | |
95 | + @controller.expects(:expire_fragment).with(:controller => 'public', :action => 'categories_menu').at_least_once | |
96 | 96 | post :edit, :id => cat.id, :category => { :name => 'new name for category in menu' } |
97 | 97 | end |
98 | 98 | |
... | ... | @@ -103,7 +103,7 @@ class CategoriesControllerTest < ActionController::TestCase |
103 | 103 | end |
104 | 104 | |
105 | 105 | should 'expire categories menu cache when new category is created for the menu' do |
106 | - @controller.expects(:expire_fragment).with(:controller => 'public', :action => 'categories_menu').once | |
106 | + @controller.expects(:expire_fragment).with(:controller => 'public', :action => 'categories_menu').at_least_once | |
107 | 107 | post :new, :category => { :name => 'my new category for the menu', :display_in_menu => '1' } |
108 | 108 | end |
109 | 109 | ... | ... |