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:
Godfrey Chan 2014-10-15 02:09:56 -07:00
parent 5d7aca3cc6
commit bddaf8193a

View File

@ -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