X-Git-Url: https://nos-oignons.net/gitweb/gestion-adh.git/blobdiff_plain/9d982cb5d7f9abe598c8df3eefabe10501056110..662dfe6fd2d9b0beeb9fb04570c3f301c8f57d90:/features/step_definitions/emails.rb?ds=sidebyside 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 +