From: Toshi MARUYAMA Date: Sat, 12 Dec 2020 15:50:36 +0000 (+0000) Subject: use with_settings at AccountControllerOpenidTest#test_login_with_openid_for_existing_user X-Git-Tag: 4.2.0~172 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b257abec9c0cdc233d4c24f3a6948a20452296a7;p=redmine.git 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 --- diff --git a/test/functional/account_controller_openid_test.rb b/test/functional/account_controller_openid_test.rb index fcf207544..7ed03d00c 100644 --- a/test/functional/account_controller_openid_test.rb +++ b/test/functional/account_controller_openid_test.rb @@ -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