X-Git-Url: https://nos-oignons.net/gitweb/gestion-adh.git/blobdiff_plain/7b61f25dd1ca4b324b85ab90ca891c5d5495c6cc..0b86faada8b828ca94b735ec4bf88b7e024f16a3:/features/step_definitions/emails.rb diff --git a/features/step_definitions/emails.rb b/features/step_definitions/emails.rb index 2bbecd3..e2e562e 100644 --- a/features/step_definitions/emails.rb +++ b/features/step_definitions/emails.rb @@ -28,6 +28,14 @@ Then /^(\d+) emails? (?:doit|doivent) avoir été envoyés?$/ do |count| Mail::TestMailer.deliveries.should have(count).email end +Then /^des emails doivent avoir été envoyés à Jane, Fatima, Fred et Moly$/ do + recipients = Mail::TestMailer.deliveries.collect(&:to) + recipients.should include(['jane@example.org']) + recipients.should include(['fatima@example.org']) + recipients.should include(['fred@example.org']) + recipients.should include(['moly@example.org']) +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')