X-Git-Url: https://nos-oignons.net/gitweb/gestion-adh.git/blobdiff_plain/9d982cb5d7f9abe598c8df3eefabe10501056110..9cb7fa95bef77a6d1e0888f741c76adc865f1b17:/features/step_definitions/emails.rb?ds=inline diff --git a/features/step_definitions/emails.rb b/features/step_definitions/emails.rb index 9ed3f98..2bbecd3 100644 --- a/features/step_definitions/emails.rb +++ b/features/step_definitions/emails.rb @@ -27,3 +27,14 @@ end Then /^(\d+) emails? (?:doit|doivent) avoir été envoyés?$/ do |count| Mail::TestMailer.deliveries.should have(count).email end + +Then /^un email doit avoir été envoyé au comité de déontologie$/ do + expect(Mail::TestMailer.deliveries).to have(1).email + expect(Mail::TestMailer.deliveries.first.to).to include('deontologie@nos-oignons.net') +end + +Then /^il doit contenir les adresses emails de Jane et Fred$/ do + expect(Mail::TestMailer.deliveries.first.body).to include('jane@example.org') + expect(Mail::TestMailer.deliveries.first.body).to include('fred@example.org') +end +