diaspora/spec/workers/mail/contacts_birthday_spec.rb
2017-12-18 04:34:35 +01:00

13 lines
435 B
Ruby

# frozen_string_literal: true
describe Workers::Mail::ContactsBirthday do
describe "#perform" do
it "should call .deliver on the notifier object" do
mail_double = double
expect(mail_double).to receive(:deliver_now)
expect(Notifier).to receive(:send_notification)
.with("contacts_birthday", alice.id).and_return(mail_double)
Workers::Mail::ContactsBirthday.new.perform(alice.id)
end
end
end