mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Better test for ticket [#3914 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
parent
df40dbe6f1
commit
f48aa14bf4
1 changed files with 11 additions and 0 deletions
|
@ -445,6 +445,17 @@ class FilterTest < ActionController::TestCase
|
|||
|
||||
end
|
||||
|
||||
class ::AppSweeper < ActionController::Caching::Sweeper; end
|
||||
class SweeperTestController < ActionController::Base
|
||||
cache_sweeper :app_sweeper
|
||||
def show
|
||||
render :text => 'hello world'
|
||||
end
|
||||
end
|
||||
def test_sweeper_should_not_block_rendering
|
||||
response = test_process(SweeperTestController)
|
||||
assert_equal 'hello world', response.body
|
||||
end
|
||||
|
||||
def test_before_method_of_sweeper_should_always_return_true
|
||||
sweeper = ActionController::Caching::Sweeper.send(:new)
|
||||
|
|
Loading…
Reference in a new issue