1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-28 19:29:38 +00:00

use with_settings at AccountControllerOpenidTest#test_login_with_openid_for_existing_user

git-svn-id: http://svn.redmine.org/redmine/trunk@20647 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2020-12-12 15:50:36 +00:00
parent e3f8562845
commit b257abec9c

View File

@ -35,20 +35,18 @@ class AccountControllerOpenidTest < Redmine::ControllerTest
if Object.const_defined?(:OpenID)
def test_login_with_openid_for_existing_user
Setting.self_registration = '3'
existing_user = User.new(:firstname => 'Cool',
:lastname => 'User',
:mail => 'user@somedomain.com',
:identity_url => 'http://openid.example.com/good_user')
existing_user.login = 'cool_user'
assert existing_user.save!
post(
:login,
:params => {
:openid_url => existing_user.identity_url
}
)
with_settings(
:openid => '1',
:self_registration => '3'
) do
post(:login, :params => {:openid_url => existing_user.identity_url})
end
assert_redirected_to '/my/page'
end