diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-06-20 13:09:54 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-06-20 13:09:54 -0700 |
commit | c1c4ecb9dbf40ca8118d5c1c1053b158fe867229 (patch) | |
tree | 94dab7b2af1ebd7e052c866236524d52adaff302 /actionmailer/test | |
parent | b046ea452cdf08035d192d041250b436a3991af8 (diff) | |
parent | 45b1045d16126e69ad5af395fa14d1291914a4d4 (diff) | |
download | rails-c1c4ecb9dbf40ca8118d5c1c1053b158fe867229.tar.gz rails-c1c4ecb9dbf40ca8118d5c1c1053b158fe867229.tar.bz2 rails-c1c4ecb9dbf40ca8118d5c1c1053b158fe867229.zip |
Merge pull request #6801 from dmathieu/mailer_raise_if_no_implicit_template
Mailer with no implicit template
Diffstat (limited to 'actionmailer/test')
9 files changed, 7 insertions, 0 deletions
diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 1d747ed18a..1b2e39b3f7 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -433,6 +433,13 @@ class BaseTest < ActiveSupport::TestCase assert_equal("TEXT Implicit Multipart", mail.text_part.body.decoded) end + test "should raise if missing template in implicit render" do + assert_raises ActionView::MissingTemplate do + BaseMailer.implicit_different_template('missing_template').deliver + end + assert_equal(0, BaseMailer.deliveries.length) + end + test "you can specify a different template for explicit render" do mail = BaseMailer.explicit_different_template('explicit_multipart_templates').deliver assert_equal("HTML Explicit Multipart Templates", mail.html_part.body.decoded) diff --git a/actionmailer/test/fixtures/base_mailer/attachment_with_hash.html.erb b/actionmailer/test/fixtures/base_mailer/attachment_with_hash.html.erb new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/actionmailer/test/fixtures/base_mailer/attachment_with_hash.html.erb diff --git a/actionmailer/test/fixtures/base_mailer/attachment_with_hash_default_encoding.html.erb b/actionmailer/test/fixtures/base_mailer/attachment_with_hash_default_encoding.html.erb new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/actionmailer/test/fixtures/base_mailer/attachment_with_hash_default_encoding.html.erb diff --git a/actionmailer/test/fixtures/base_mailer/welcome_with_headers.html.erb b/actionmailer/test/fixtures/base_mailer/welcome_with_headers.html.erb new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/actionmailer/test/fixtures/base_mailer/welcome_with_headers.html.erb diff --git a/actionmailer/test/fixtures/base_test/after_filter_mailer/welcome.html.erb b/actionmailer/test/fixtures/base_test/after_filter_mailer/welcome.html.erb new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/actionmailer/test/fixtures/base_test/after_filter_mailer/welcome.html.erb diff --git a/actionmailer/test/fixtures/base_test/before_filter_mailer/welcome.html.erb b/actionmailer/test/fixtures/base_test/before_filter_mailer/welcome.html.erb new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/actionmailer/test/fixtures/base_test/before_filter_mailer/welcome.html.erb diff --git a/actionmailer/test/fixtures/base_test/default_inline_attachment_mailer/welcome.html.erb b/actionmailer/test/fixtures/base_test/default_inline_attachment_mailer/welcome.html.erb new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/actionmailer/test/fixtures/base_test/default_inline_attachment_mailer/welcome.html.erb diff --git a/actionmailer/test/fixtures/mail_delivery_test/delivery_mailer/welcome.html.erb b/actionmailer/test/fixtures/mail_delivery_test/delivery_mailer/welcome.html.erb new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/actionmailer/test/fixtures/mail_delivery_test/delivery_mailer/welcome.html.erb diff --git a/actionmailer/test/fixtures/proc_mailer/welcome.html.erb b/actionmailer/test/fixtures/proc_mailer/welcome.html.erb new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/actionmailer/test/fixtures/proc_mailer/welcome.html.erb |