Login field name changed to username (#755).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1181 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-02-29 21:18:35 +00:00
parent 9daf39ec52
commit 87742f23ed
4 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -45,7 +45,7 @@ class AccountControllerTest < Test::Unit::TestCase
end
def test_login_with_wrong_password
post :login, :login => 'admin', :password => 'bad'
post :login, :username => 'admin', :password => 'bad'
assert_response :success
assert_template 'login'
assert_tag 'div',
@@ -56,7 +56,7 @@ class AccountControllerTest < Test::Unit::TestCase
def test_autologin
Setting.autologin = "7"
Token.delete_all
post :login, :login => 'admin', :password => 'admin', :autologin => 1
post :login, :username => 'admin', :password => 'admin', :autologin => 1
assert_redirected_to 'my/page'
token = Token.find :first
assert_not_nil token
+1 -1
View File
@@ -49,7 +49,7 @@ class Test::Unit::TestCase
assert_equal nil, session[:user_id]
assert_response :success
assert_template "account/login"
post "/account/login", :login => login, :password => password
post "/account/login", :username => login, :password => password
assert_redirected_to "my/page"
assert_equal login, User.find(session[:user_id]).login
end