mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: email_always was not respected correctly
In the past email always meant, email me even if active UNLESS I read post Now emails always means, always, even if I read the post
This commit is contained in:
@@ -57,6 +57,8 @@ describe Jobs::UserEmail do
|
||||
it "does send an email to a user that's been recently seen but has email_always set" do
|
||||
user.update_attributes(last_seen_at: 9.minutes.ago)
|
||||
user.user_option.update_attributes(email_always: true)
|
||||
PostTiming.create!(topic_id: post.topic_id, post_number: post.post_number, user_id: user.id, msecs: 100)
|
||||
|
||||
Email::Sender.any_instance.expects(:send)
|
||||
Jobs::UserEmail.new.execute(type: :user_replied, user_id: user.id, post_id: post.id)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user