-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Utiliser from plutôt que reply-to dans les emails de file d’attente (#…
…4898) * Utiliser from plutôt que reply-to dans les emails de file d’attente * fix specs
- Loading branch information
1 parent
4c59ac6
commit eafdda6
Showing
2 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
RSpec.describe Users::FileAttenteMailer, type: :mailer do | ||
describe "#new_creneau_available" do | ||
let(:rdv) { create(:rdv) } | ||
let(:user) { rdv.users.first } | ||
let(:mail) { described_class.with(rdv:, user:).new_creneau_available } | ||
|
||
specify do | ||
expect(mail[:from].to_s).to match(/"RDV Solidarités" <rdv\+[a-z0-9\-]+@reply\.rdv-solidarites-test\.localhost>/) | ||
expect(mail.to).to eq([user.email]) | ||
expect(mail.reply_to).to be_nil | ||
expect(mail.subject).to eq("Un créneau vient de se liberer !") | ||
expect(mail.body.raw_source).to match(/Des créneaux pour votre RDV/) # for some reason, mail.html_part is nil | ||
end | ||
end | ||
end |