Corrected typo, corrected accidental tab, removed unnecessary database rollback

Corrected it "do send" to it "does send"
Removed unnecessary user.update_column (rollback happens automatically)
Replaced Tab with spaces.
This commit is contained in:
Peter N Lewis 2014-06-10 11:36:20 +08:00
parent 87e254cc3a
commit 8b32fb5b6d

View File

@ -124,12 +124,11 @@ describe Jobs::UserEmail do
Jobs::UserEmail.new.execute(type: :user_mentioned, user_id: user.id, notification_id: notification.id) Jobs::UserEmail.new.execute(type: :user_mentioned, user_id: user.id, notification_id: notification.id)
end end
it "do send the email if the notification has been seen but the user is set for email_always" do it "does send the email if the notification has been seen but the user is set for email_always" do
Email::Sender.any_instance.expects(:send) Email::Sender.any_instance.expects(:send)
notification.update_column(:read, true) notification.update_column(:read, true)
user.update_column(:email_always, true) user.update_column(:email_always, true)
Jobs::UserEmail.new.execute(type: :user_mentioned, user_id: user.id, notification_id: notification.id) Jobs::UserEmail.new.execute(type: :user_mentioned, user_id: user.id, notification_id: notification.id)
user.update_column(:email_always, false)
end end
it "doesn't send the email if the post has been user deleted" do it "doesn't send the email if the post has been user deleted" do