X-Git-Url: https://www.nos-oignons.net/gitweb/gestion-adh.git/blobdiff_plain/7b61f25dd1ca4b324b85ab90ca891c5d5495c6cc..6f0407b6532f52cb0726b2b7fe0070e1709dd5dc:/features/step_definitions/emails.rb?ds=sidebyside diff --git a/features/step_definitions/emails.rb b/features/step_definitions/emails.rb index 2bbecd3..c6935e6 100644 --- a/features/step_definitions/emails.rb +++ b/features/step_definitions/emails.rb @@ -1,4 +1,20 @@ #-*- coding: utf-8 -*- +# +# Système de gestion des adhésions de Nos oignons +# Copyright © 2013-2014 Nos oignons +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . Then /^aucun email ne doit avoir été envoyé$/ do Mail::TestMailer.deliveries.should be_empty @@ -28,6 +44,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')