Commit a6ab9d6fc8661778329c37130a1085e7cdae4335
Exists in
master
and in
29 other branches
Merge branch 'stable'
Showing
2 changed files
with
8 additions
and
0 deletions
Show diff stats
app/models/user.rb
test/unit/user_test.rb
... | ... | @@ -430,6 +430,13 @@ class UserTest < ActiveSupport::TestCase |
430 | 430 | assert_equal 'pending@activation.com', ActionMailer::Base.deliveries.last['to'].to_s |
431 | 431 | end |
432 | 432 | |
433 | + should 'not try to deliver email to template users' do | |
434 | + Person.any_instance.stubs(:is_template?).returns(true) | |
435 | + assert_no_difference ActionMailer::Base.deliveries, :size do | |
436 | + new_user | |
437 | + end | |
438 | + end | |
439 | + | |
433 | 440 | should 'not mass assign activated at' do |
434 | 441 | user = User.new :activated_at => 5.days.ago |
435 | 442 | assert_nil user.activated_at | ... | ... |