summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-11-14 13:19:12 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-11-14 13:19:12 +0000
commit99375c1d34c32d6326d975d46867cedfc0447eb9 (patch)
treeee848a2caf0ddc968aadaa79f895240f89bc3aa8
parent6bc4440eab7873b2a461763f294ced8aa0ec56a5 (diff)
downloadredmine-99375c1d34c32d6326d975d46867cedfc0447eb9.tar.gz
redmine-99375c1d34c32d6326d975d46867cedfc0447eb9.zip
use with_settings at UsersControllerTest#test_create
git-svn-id: http://svn.redmine.org/redmine/trunk@20375 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--test/functional/users_controller_test.rb35
1 files changed, 19 insertions, 16 deletions
diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb
index 3bf945205..1fb05c593 100644
--- a/test/functional/users_controller_test.rb
+++ b/test/functional/users_controller_test.rb
@@ -283,22 +283,25 @@ class UsersControllerTest < Redmine::ControllerTest
end
def test_create
- Setting.bcc_recipients = '1'
-
- assert_difference 'User.count' do
- assert_difference 'ActionMailer::Base.deliveries.size' do
- post :create, :params => {
- :user => {
- :firstname => 'John',
- :lastname => 'Doe',
- :login => 'jdoe',
- :password => 'secret123',
- :password_confirmation => 'secret123',
- :mail => 'jdoe@gmail.com',
- :mail_notification => 'none'
- },
- :send_information => '1'
- }
+ with_settings :bcc_recipients => '1' do
+ assert_difference 'User.count' do
+ assert_difference 'ActionMailer::Base.deliveries.size' do
+ post(
+ :create,
+ :params => {
+ :user => {
+ :firstname => 'John',
+ :lastname => 'Doe',
+ :login => 'jdoe',
+ :password => 'secret123',
+ :password_confirmation => 'secret123',
+ :mail => 'jdoe@gmail.com',
+ :mail_notification => 'none'
+ },
+ :send_information => '1'
+ }
+ )
+ end
end
end