提交 2d74f6c1 编写于 作者: A Akira Matsuda

AC::Base#flash is a public method

上级 c848baff
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册