aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/calendar_observer_spec.rb
diff options
context:
space:
mode:
authorXinhui2017-07-20 14:44:24 +0200
committerXinhui2017-07-20 14:44:24 +0200
commit91bfabc3b46973409de4279063804e0edaea1c27 (patch)
treede8885a8d82d5f44b75e2ab0cd3ab1871bad94c0 /spec/models/calendar_observer_spec.rb
parent4fd4fa0fd24c9cd86161358f2e36cff64f3712d7 (diff)
downloadchouette-core-91bfabc3b46973409de4279063804e0edaea1c27.tar.bz2
Fix SMTP to address not found for delayed job
Refs #2263
Diffstat (limited to 'spec/models/calendar_observer_spec.rb')
-rw-r--r--spec/models/calendar_observer_spec.rb8
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