Skip to content

Commit 3498a6a

Browse files
committed
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
1 parent ca099da commit 3498a6a

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

test/functional/account_controller_openid_test.rb

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,19 @@ def test_login_with_invalid_openid_provider
6262
end
6363

6464
def test_login_with_openid_for_existing_non_active_user
65-
Setting.self_registration = '2'
6665
existing_user = User.new(:firstname => 'Cool',
6766
:lastname => 'User',
6867
:mail => '[email protected]',
6968
:identity_url => 'http://openid.example.com/good_user',
7069
:status => User::STATUS_REGISTERED)
7170
existing_user.login = 'cool_user'
7271
assert existing_user.save!
73-
74-
post(
75-
:login,
76-
:params => {
77-
:openid_url => existing_user.identity_url
78-
}
79-
)
72+
with_settings(
73+
:openid => '1',
74+
:self_registration => '2'
75+
) do
76+
post(:login, :params => {:openid_url => existing_user.identity_url})
77+
end
8078
assert_redirected_to '/login'
8179
end
8280

0 commit comments

Comments
 (0)