adding test for namedspaced mailers
This commit is contained in:
parent
990719bb59
commit
ae812e9fc9
@ -59,6 +59,15 @@ def test_logs_if_the_template_engine_cannot_be_found
|
||||
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
Block a user