Commit b8920a1e95ef9e9d54527de691fbeb1b1921a27f

Authored by Daniela Feitosa
1 parent 60fc7b7b

Revert "Do not send email to template users"

This reverts commit 521420587c18163c55c790a2f5241489260cea38.

is_template is not defined on stable version yet:
"NoMethodError: undefined method `is_template?'"
Showing 2 changed files with 0 additions and 8 deletions   Show diff stats
app/models/user.rb
... ... @@ -291,7 +291,6 @@ class User < ActiveRecord::Base
291 291 end
292 292  
293 293 def deliver_activation_code
294   - return if person.is_template?
295 294 User::Mailer.deliver_activation_code(self) unless self.activation_code.blank?
296 295 end
297 296  
... ...
test/unit/user_test.rb
... ... @@ -430,13 +430,6 @@ 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   -
440 433 should 'not mass assign activated at' do
441 434 user = User.new :activated_at => 5.days.ago
442 435 assert_nil user.activated_at
... ...