1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix deprecation warnings in verification tests.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4963 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jeremy Kemper 2006-09-04 03:17:32 +00:00
parent c3a52523ce
commit 25ea18aa15

View file

@ -9,7 +9,7 @@ class VerificationTest < Test::Unit::TestCase
:redirect_to => { :action => "unguarded" }
verify :only => :guarded_with_flash, :params => "one",
:add_flash => { "notice" => "prereqs failed" },
:add_flash => { :notice => "prereqs failed" },
:redirect_to => { :action => "unguarded" }
verify :only => :guarded_in_session, :session => "one",
@ -46,15 +46,15 @@ class VerificationTest < Test::Unit::TestCase
end
def guarded_in_session
render :text => "#{@session["one"]}"
render :text => "#{session["one"]}"
end
def multi_one
render :text => "#{@session["one"]}:#{@session["two"]}"
render :text => "#{session["one"]}:#{session["two"]}"
end
def multi_two
render :text => "#{@session["two"]}:#{@session["one"]}"
render :text => "#{session["two"]}:#{session["one"]}"
end
def guarded_by_method
@ -108,13 +108,13 @@ class VerificationTest < Test::Unit::TestCase
def test_guarded_with_flash_with_prereqs
get :guarded_with_flash, :one => "here"
assert_equal "here", @response.body
assert_flash_empty
assert flash.empty?
end
def test_guarded_with_flash_without_prereqs
get :guarded_with_flash
assert_redirected_to :action => "unguarded"
assert_flash_equal "prereqs failed", "notice"
assert_equal "prereqs failed", flash[:notice]
end
def test_guarded_two_with_prereqs