2014-06-23 23:39:42 +02:00
|
|
|
require 'test_helper'
|
|
|
|
|
|
|
|
class NoteMailerTest < ActionMailer::TestCase
|
|
|
|
setup do
|
|
|
|
ActionMailer::Base.default_url_options[:host] = 'localhost:3000'
|
|
|
|
end
|
|
|
|
|
2014-07-01 15:50:39 +02:00
|
|
|
test 'create' do
|
|
|
|
mail = NoteMailer.create Note.last
|
2014-07-18 19:30:59 +02:00
|
|
|
assert_match(/\[Agenda du Libre\] Demande d'informations sur l'événement .*/, mail.subject)
|
2014-06-23 23:39:42 +02:00
|
|
|
assert_equal [Note.last.event.contact], mail.to
|
|
|
|
assert_equal ["moderateurs@agendadulibre.org"], mail.from
|
|
|
|
end
|
|
|
|
end
|