NotificationMailer: add send notification
This commit is contained in:
parent
89763ec8d4
commit
65d399b4b0
2 changed files with 19 additions and 0 deletions
|
@ -1,6 +1,16 @@
|
|||
require "spec_helper"
|
||||
|
||||
RSpec.describe NotificationMailer, type: :mailer do
|
||||
describe '.send_notification' do
|
||||
let(:user) { create(:user) }
|
||||
let(:dossier) { create(:dossier, user: user) }
|
||||
let(:email) { instance_double('email', object_for_dossier: 'object', body_for_dossier: 'body') }
|
||||
subject { described_class.send_notification(dossier, email) }
|
||||
|
||||
it { expect(subject.subject).to eq(email.object_for_dossier) }
|
||||
it { expect(subject.body).to eq(email.body_for_dossier) }
|
||||
end
|
||||
|
||||
describe ".new_answer" do
|
||||
let(:user) { create(:user) }
|
||||
let(:dossier) { create(:dossier, user: user) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue