mirror of https://github.com/rails/rails
adding test for namedspaced mailers
This commit is contained in:
parent
990719bb59
commit
ae812e9fc9
|
@ -59,6 +59,15 @@ class MailerGeneratorTest < Rails::Generators::TestCase
|
|||
assert_match /haml \[not found\]/, content
|
||||
end
|
||||
|
||||
def test_mailer_with_namedspaced_mailer
|
||||
run_generator ["Farm::Animal", "moos"]
|
||||
assert_file "app/mailers/farm/animal.rb" do |mailer|
|
||||
assert_match /class Farm::Animal < ActionMailer::Base/, mailer
|
||||
assert_match /en\.farm\.animal\.moos\.subject/, mailer
|
||||
end
|
||||
assert_file "app/views/farm/animal/moos.text.erb"
|
||||
end
|
||||
|
||||
def test_actions_are_turned_into_methods
|
||||
run_generator
|
||||
|
||||
|
|
Loading…
Reference in New Issue