From: Toshi MARUYAMA Date: Thu, 17 Dec 2020 13:11:13 +0000 (+0000) Subject: use with_settings at AccountControllerOpenidTest#test_login_with_openid_for_existing_... X-Git-Tag: 4.2.0~155 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3498a6a6247612f04f24185bd6175a113d4987b9;p=redmine.git use with_settings at AccountControllerOpenidTest#test_login_with_openid_for_existing_non_active_user git-svn-id: http://svn.redmine.org/redmine/trunk@20664 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/test/functional/account_controller_openid_test.rb b/test/functional/account_controller_openid_test.rb index 7ed03d00c..1a51fc879 100644 --- a/test/functional/account_controller_openid_test.rb +++ b/test/functional/account_controller_openid_test.rb @@ -62,7 +62,6 @@ class AccountControllerOpenidTest < Redmine::ControllerTest end def test_login_with_openid_for_existing_non_active_user - Setting.self_registration = '2' existing_user = User.new(:firstname => 'Cool', :lastname => 'User', :mail => 'user@somedomain.com', @@ -70,13 +69,12 @@ class AccountControllerOpenidTest < Redmine::ControllerTest :status => User::STATUS_REGISTERED) existing_user.login = 'cool_user' assert existing_user.save! - - post( - :login, - :params => { - :openid_url => existing_user.identity_url - } - ) + with_settings( + :openid => '1', + :self_registration => '2' + ) do + post(:login, :params => {:openid_url => existing_user.identity_url}) + end assert_redirected_to '/login' end