diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-11-16 12:22:54 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-11-16 12:22:54 +0000 |
commit | 27aad8c10dcba83e4790df53e0ebd2f983183f43 (patch) | |
tree | 6dc9250b2ab9d4bcaee45c788db2bb12ab1c4c4d | |
parent | fde9b61757ead87757d0e807a08d06fdddb15fb1 (diff) | |
download | redmine-27aad8c10dcba83e4790df53e0ebd2f983183f43.tar.gz redmine-27aad8c10dcba83e4790df53e0ebd2f983183f43.zip |
use with_settings at UsersControllerTest#test_update_with_password_change_should_send_a_notification
git-svn-id: http://svn.redmine.org/redmine/trunk@20400 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | test/functional/users_controller_test.rb | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb index 0b0d644a9..4d3f877b2 100644 --- a/test/functional/users_controller_test.rb +++ b/test/functional/users_controller_test.rb @@ -568,13 +568,19 @@ class UsersControllerTest < Redmine::ControllerTest def test_update_with_password_change_should_send_a_notification ActionMailer::Base.deliveries.clear - Setting.bcc_recipients = '1' - - put :update, :params => { - :id => 2, - :user => {:password => 'newpass123', :password_confirmation => 'newpass123'}, - :send_information => '1' - } + with_settings :bcc_recipients => '1' do + put( + :update, + :params => { + :id => 2, + :user => { + :password => 'newpass123', + :password_confirmation => 'newpass123' + }, + :send_information => '1' + } + ) + end u = User.find(2) assert u.check_password?('newpass123') |