mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 23:13:48 +08:00
HAX: check the message
object, not the MessageDelivery
object
See 669bf73 for background. It's probably better to rewrite these test without using the internal `NullMail` class anyway.
This commit is contained in:
parent
5d7aca3cc6
commit
bddaf8193a
|
@ -112,14 +112,21 @@ describe UserNotifications do
|
|||
# in mailing list mode user_replies is not sent through
|
||||
response.user.mailing_list_mode = true
|
||||
mail = UserNotifications.user_replied(response.user, post: response, notification: notification)
|
||||
mail.class.should == ActionMailer::Base::NullMail
|
||||
|
||||
if rails_master?
|
||||
mail.message.class.should == ActionMailer::Base::NullMail
|
||||
else
|
||||
mail.class.should == ActionMailer::Base::NullMail
|
||||
end
|
||||
|
||||
response.user.mailing_list_mode = nil
|
||||
mail = UserNotifications.user_replied(response.user, post: response, notification: notification)
|
||||
|
||||
mail.class.should_not == ActionMailer::Base::NullMail
|
||||
|
||||
if rails_master?
|
||||
mail.message.class.should_not == ActionMailer::Base::NullMail
|
||||
else
|
||||
mail.class.should_not == ActionMailer::Base::NullMail
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user