Update to Rails 2.3.8
This commit is contained in:
parent
6677b46cb4
commit
f0635301aa
429 changed files with 17683 additions and 4047 deletions
|
@ -71,6 +71,18 @@ class FlashTest < ActionController::TestCase
|
|||
redirect_to :action => "std_action"
|
||||
@flash_copy = {}.update(flash)
|
||||
end
|
||||
|
||||
def redirect_with_alert
|
||||
redirect_to '/nowhere', :alert => "Beware the nowheres!"
|
||||
end
|
||||
|
||||
def redirect_with_notice
|
||||
redirect_to '/somewhere', :notice => "Good luck in the somewheres!"
|
||||
end
|
||||
|
||||
def redirect_with_other_flashes
|
||||
redirect_to '/wonderland', :flash => { :joyride => "Horses!" }
|
||||
end
|
||||
end
|
||||
|
||||
tests TestController
|
||||
|
@ -144,4 +156,19 @@ class FlashTest < ActionController::TestCase
|
|||
get :std_action
|
||||
assert_nil session["flash"]
|
||||
end
|
||||
end
|
||||
|
||||
def test_redirect_to_with_alert
|
||||
get :redirect_with_alert
|
||||
assert_equal "Beware the nowheres!", @controller.send(:flash)[:alert]
|
||||
end
|
||||
|
||||
def test_redirect_to_with_notice
|
||||
get :redirect_with_notice
|
||||
assert_equal "Good luck in the somewheres!", @controller.send(:flash)[:notice]
|
||||
end
|
||||
|
||||
def test_redirect_to_with_other_flashes
|
||||
get :redirect_with_other_flashes
|
||||
assert_equal "Horses!", @controller.send(:flash)[:joyride]
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue