AC::Base#flash is a public method
This commit is contained in:
parent
c848baffd2
commit
2d74f6c152
@ -189,27 +189,27 @@ def test_keep_and_discard_return_values
|
||||
|
||||
def test_redirect_to_with_alert
|
||||
get :redirect_with_alert
|
||||
assert_equal "Beware the nowheres!", @controller.send(:flash)[:alert]
|
||||
assert_equal "Beware the nowheres!", @controller.flash[:alert]
|
||||
end
|
||||
|
||||
def test_redirect_to_with_notice
|
||||
get :redirect_with_notice
|
||||
assert_equal "Good luck in the somewheres!", @controller.send(:flash)[:notice]
|
||||
assert_equal "Good luck in the somewheres!", @controller.flash[:notice]
|
||||
end
|
||||
|
||||
def test_render_with_flash_now_alert
|
||||
get :render_with_flash_now_alert
|
||||
assert_equal "Beware the nowheres now!", @controller.send(:flash)[:alert]
|
||||
assert_equal "Beware the nowheres now!", @controller.flash[:alert]
|
||||
end
|
||||
|
||||
def test_render_with_flash_now_notice
|
||||
get :render_with_flash_now_notice
|
||||
assert_equal "Good luck in the somewheres now!", @controller.send(:flash)[:notice]
|
||||
assert_equal "Good luck in the somewheres now!", @controller.flash[:notice]
|
||||
end
|
||||
|
||||
def test_redirect_to_with_other_flashes
|
||||
get :redirect_with_other_flashes
|
||||
assert_equal "Horses!", @controller.send(:flash)[:joyride]
|
||||
assert_equal "Horses!", @controller.flash[:joyride]
|
||||
end
|
||||
|
||||
def test_redirect_to_with_adding_flash_types
|
||||
@ -219,7 +219,7 @@ def test_redirect_to_with_adding_flash_types
|
||||
end
|
||||
@controller = test_controller_with_flash_type_foo.new
|
||||
get :redirect_with_foo_flash
|
||||
assert_equal "for great justice", @controller.send(:flash)[:foo]
|
||||
assert_equal "for great justice", @controller.flash[:foo]
|
||||
ensure
|
||||
@controller = original_controller
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user