Fixed a bug in the OpenID login when a user signed up with OpenID but hasn't
been activated yet. When logging in the user would come back to the login page with the back_url of My Page. This was caused by open_id_authenticate sending the user to My Page and My Page redirecting the user back to the login page because they haven't been activated. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2482 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -80,6 +80,21 @@ class AccountControllerTest < Test::Unit::TestCase
|
||||
assert_redirected_to 'my/page'
|
||||
end
|
||||
|
||||
def test_login_with_openid_for_existing_non_active_user
|
||||
Setting.self_registration = '2'
|
||||
Setting.openid = '1'
|
||||
existing_user = User.new(:firstname => 'Cool',
|
||||
:lastname => 'User',
|
||||
:mail => 'user@somedomain.com',
|
||||
:identity_url => 'http://openid.example.com/good_user',
|
||||
:status => User::STATUS_REGISTERED)
|
||||
existing_user.login = 'cool_user'
|
||||
assert existing_user.save!
|
||||
|
||||
post :login, :openid_url => existing_user.identity_url
|
||||
assert_redirected_to 'login'
|
||||
end
|
||||
|
||||
def test_login_with_openid_with_new_user_created
|
||||
Setting.self_registration = '3'
|
||||
Setting.openid = '1'
|
||||
|
||||
Reference in New Issue
Block a user