diff options
| author | Xinhui | 2017-07-20 14:44:24 +0200 |
|---|---|---|
| committer | Xinhui | 2017-07-20 14:44:24 +0200 |
| commit | 91bfabc3b46973409de4279063804e0edaea1c27 (patch) | |
| tree | de8885a8d82d5f44b75e2ab0cd3ab1871bad94c0 /spec | |
| parent | 4fd4fa0fd24c9cd86161358f2e36cff64f3712d7 (diff) | |
| download | chouette-core-91bfabc3b46973409de4279063804e0edaea1c27.tar.bz2 | |
Fix SMTP to address not found for delayed job
Refs #2263
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/models/calendar_observer_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/models/calendar_observer_spec.rb b/spec/models/calendar_observer_spec.rb index abb462d25..4fba02bef 100644 --- a/spec/models/calendar_observer_spec.rb +++ b/spec/models/calendar_observer_spec.rb @@ -12,14 +12,14 @@ RSpec.describe CalendarObserver, type: :observer do it 'should schedule mailer on calendar update' do calendar.name = 'edited_name' - expect(MailerJob).to receive(:perform_later).with 'CalendarMailer', 'updated', [calendar, user] + expect(MailerJob).to receive(:perform_later).with 'CalendarMailer', 'updated', [calendar.id, user.id] calendar.save end it 'should not schedule mailer for none shared calendar on update' do calendar = create(:calendar, shared: false) calendar.name = 'edited_name' - expect(MailerJob).to_not receive(:perform_later).with 'CalendarMailer', 'updated', [calendar, user] + expect(MailerJob).to_not receive(:perform_later).with 'CalendarMailer', 'updated', [calendar.id, user.id] calendar.save end end @@ -31,12 +31,12 @@ RSpec.describe CalendarObserver, type: :observer do end it 'should schedule mailer on calendar create' do - expect(MailerJob).to receive(:perform_later).with 'CalendarMailer', 'created', [anything, user] + expect(MailerJob).to receive(:perform_later).with 'CalendarMailer', 'created', [anything, user.id] build(:calendar, shared: true).save end it 'should not schedule mailer for none shared calendar on create' do - expect(MailerJob).to_not receive(:perform_later).with 'CalendarMailer', 'created', [anything, user] + expect(MailerJob).to_not receive(:perform_later).with 'CalendarMailer', 'created', [anything, user.id] build(:calendar, shared: false).save end end |
