Prevent registration via OpenID if self registration is off. #699
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2448 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -86,7 +86,15 @@ class AccountControllerTest < Test::Unit::TestCase
|
||||
assert_equal 'Cool', user.firstname
|
||||
assert_equal 'User', user.lastname
|
||||
end
|
||||
|
||||
|
||||
def test_login_with_openid_with_new_user_and_self_registration_off
|
||||
Setting.self_registration = '0'
|
||||
post :login, :openid_url => 'http://openid.example.com/good_user'
|
||||
assert_redirected_to home_url
|
||||
user = User.find_by_login('cool_user')
|
||||
assert ! user
|
||||
end
|
||||
|
||||
def test_login_with_openid_with_new_user_created_with_email_activation_should_have_a_token
|
||||
Setting.self_registration = '1'
|
||||
post :login, :openid_url => 'http://openid.example.com/good_user'
|
||||
|
||||
Reference in New Issue
Block a user