mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-04 23:11:47 +01:00
Upgraded to Rails version to 1-2-pre-release branch revision 5704. Lots of stuff is deprecated in Rails 1.2, so this changeset
also removes deprecated methods. All tests pass (at least on my machine!) and raise no deprecation warnings. git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@365 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
baf649e143
commit
d7bb7555a0
1140 changed files with 135108 additions and 1098 deletions
|
|
@ -24,7 +24,7 @@ class LoginControllerTest < Test::Unit::TestCase
|
|||
def test_invalid_login
|
||||
post :login, {:user_login => 'cracker', :user_password => 'secret', :user_noexpiry => 'on'}
|
||||
assert_response :success
|
||||
assert_session_has_no :user_id
|
||||
assert(!@response.has_session_object?(:user_id))
|
||||
assert_template "login"
|
||||
end
|
||||
|
||||
|
|
@ -35,7 +35,7 @@ class LoginControllerTest < Test::Unit::TestCase
|
|||
assert_equal user.login, "admin"
|
||||
assert user.is_admin
|
||||
assert_equal "Login successful: session will not expire.", flash[:notice]
|
||||
assert_redirect_url "http://#{@request.host}/bogus/location"
|
||||
assert_equal("http://#{@request.host}/bogus/location", @response.redirect_url)
|
||||
end
|
||||
|
||||
|
||||
|
|
@ -59,14 +59,14 @@ class LoginControllerTest < Test::Unit::TestCase
|
|||
#
|
||||
def test_login_bad_password
|
||||
post :login, {:user_login => 'jane', :user_password => 'wrong', :user_noexpiry => 'on'}
|
||||
assert_session_has_no :user
|
||||
assert(!@response.has_session_object?(:user))
|
||||
assert_equal "Login unsuccessful", flash[:warning]
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
def test_login_bad_login
|
||||
post :login, {:user_login => 'blah', :user_password => 'sesame', :user_noexpiry => 'on'}
|
||||
assert_session_has_no :user
|
||||
assert(!@response.has_session_object?(:user))
|
||||
assert_equal "Login unsuccessful", flash[:warning]
|
||||
assert_response :success
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue