diff --git a/app/models/user.rb b/app/models/user.rb index 14855ee..575ab04 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -291,7 +291,6 @@ class User < ActiveRecord::Base end def deliver_activation_code - return if person.is_template? User::Mailer.deliver_activation_code(self) unless self.activation_code.blank? end diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb index 6f8fa6d..6dbe034 100644 --- a/test/unit/user_test.rb +++ b/test/unit/user_test.rb @@ -430,13 +430,6 @@ class UserTest < ActiveSupport::TestCase assert_equal 'pending@activation.com', ActionMailer::Base.deliveries.last['to'].to_s end - should 'not try to deliver email to template users' do - Person.any_instance.stubs(:is_template?).returns(true) - assert_no_difference ActionMailer::Base.deliveries, :size do - new_user - end - end - should 'not mass assign activated at' do user = User.new :activated_at => 5.days.ago assert_nil user.activated_at -- libgit2 0.21.2