diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-01-02 10:47:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-02 10:47:32 +0100 |
commit | 66436d08959998be20c6c6bf631177d8c1f3e0d1 (patch) | |
tree | e9d8fd6b53006cbf2c12418a9ebfa6e46a1be617 /spec | |
parent | dc84899fffbee254454e88f3d78848eb6c51beeb (diff) |
Improve e-mail digest (#9689)
- Reduce time-to-digest from 20 to 7 days - Fetch mentions starting from +1 day since last login - Fix case when last login is more recent than last e-mail - Do not render all mentions, only 40, but show number in subject - Do not send digest to moved accounts - Do send digest to silenced accounts
Diffstat (limited to 'spec')
-rw-r--r-- | spec/mailers/notification_mailer_spec.rb | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/spec/mailers/notification_mailer_spec.rb b/spec/mailers/notification_mailer_spec.rb index 1be01e8ba..38916b54f 100644 --- a/spec/mailers/notification_mailer_spec.rb +++ b/spec/mailers/notification_mailer_spec.rb @@ -126,19 +126,7 @@ RSpec.describe NotificationMailer, type: :mailer do end end - it 'includes activities since the date specified by :since option' do - receiver.update!(last_emailed_at: '2000-02-01T00:00:00Z', current_sign_in_at: '2000-03-01T00:00:00Z') - mail = NotificationMailer.digest(receiver.account, since: Time.parse('2000-01-01T00:00:00Z')) - expect(mail.body.encoded).to include 'Jan 01, 2000, 00:00' - end - - it 'includes activities since the receiver was last emailed if :since option is unavailable' do - receiver.update!(last_emailed_at: '2000-02-01T00:00:00Z', current_sign_in_at: '2000-03-01T00:00:00Z') - mail = NotificationMailer.digest(receiver.account) - expect(mail.body.encoded).to include 'Feb 01, 2000, 00:00' - end - - it 'includes activities since the receiver last signed in if :since option and the last emailed date are unavailable' do + it 'includes activities since the receiver last signed in' do receiver.update!(last_emailed_at: nil, current_sign_in_at: '2000-03-01T00:00:00Z') mail = NotificationMailer.digest(receiver.account) expect(mail.body.encoded).to include 'Mar 01, 2000, 00:00' |