summaryrefslogtreecommitdiffstats
path: root/test/functional
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-11-15 12:37:25 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-11-15 12:37:25 +0000
commit90405c2021169b8b067b7346a9a38bb8f50e8d90 (patch)
tree48e41340acf2ac54149b80a0148e46b845ff1053 /test/functional
parenteee1c99a0a71a94e0c6f60d997be60e42bf11aca (diff)
downloadredmine-90405c2021169b8b067b7346a9a38bb8f50e8d90.tar.gz
redmine-90405c2021169b8b067b7346a9a38bb8f50e8d90.zip
use with_settings at UsersControllerTest#test_update_with_activation_should_send_a_notification
git-svn-id: http://svn.redmine.org/redmine/trunk@20388 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/users_controller_test.rb18
1 files changed, 11 insertions, 7 deletions
diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb
index 1fb05c593..0b0d644a9 100644
--- a/test/functional/users_controller_test.rb
+++ b/test/functional/users_controller_test.rb
@@ -544,17 +544,21 @@ class UsersControllerTest < Redmine::ControllerTest
end
def test_update_with_activation_should_send_a_notification
- u = User.new(:firstname => 'Foo', :lastname => 'Bar', :mail => 'foo.bar@somenet.foo', :language => 'fr')
+ u = User.new(:firstname => 'Foo', :lastname => 'Bar',
+ :mail => 'foo.bar@somenet.foo', :language => 'fr')
u.login = 'foo'
u.status = User::STATUS_REGISTERED
u.save!
ActionMailer::Base.deliveries.clear
- Setting.bcc_recipients = '1'
-
- put :update, :params => {
- :id => u.id,
- :user => {:status => User::STATUS_ACTIVE}
- }
+ with_settings :bcc_recipients => '1' do
+ put(
+ :update,
+ :params => {
+ :id => u.id,
+ :user => {:status => User::STATUS_ACTIVE}
+ }
+ )
+ end
assert u.reload.active?
mail = ActionMailer::Base.deliveries.last
assert_not_nil mail