mirror of
https://github.com/redmine/redmine.git
synced 2025-12-16 05:20:28 +01:00
use with_settings at UsersControllerTest#test_create
git-svn-id: http://svn.redmine.org/redmine/trunk@20375 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user