15 lines
437 B
Ruby
15 lines
437 B
Ruby
|
require 'test_helper'
|
||
|
|
||
|
class NoteMailerTest < ActionMailer::TestCase
|
||
|
setup do
|
||
|
ActionMailer::Base.default_url_options[:host] = 'localhost:3000'
|
||
|
end
|
||
|
|
||
|
test "create" do
|
||
|
mail = NoteMailer.create(Note.last)
|
||
|
assert_match(/\[Agenda du Libre\] Demande d'informations sur l'évènement .*/, mail.subject)
|
||
|
assert_equal [Note.last.event.contact], mail.to
|
||
|
assert_equal ["moderateurs@agendadulibre.org"], mail.from
|
||
|
end
|
||
|
end
|