aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test
Commit message (Collapse)AuthorAgeFilesLines
* remove noise from AM testsAditya Kapoor2015-02-071-5/+16
|
* Removed magic comments # encoding: utf-8 , since its default from ruby 2.0 ↵Vipul A M2015-02-033-3/+0
| | | | onwards.
* Use public Module#include, in favor of https://bugs.ruby-lang.org/issues/8846robertomiranda2015-01-311-1/+1
| | | | ref: https://github.com/rails/rails/pull/18763#issuecomment-72349769
* Fix assertion that was never runclaudiob2015-01-111-1/+1
| | | | | | | | | | | | In order to run whether the `welcome` method of the ActionMailer::Base subclass raises an error, `message` must be called, otherwise the method is not executed at all. You could just replace with `def welcome; raise StandardError; end` and you would still see a passing test. This commit fixes the test so the assertion is actually executed, just like any other tests in the file, where `.message` is called.
* Add assert_enqueued_emails and assert_no_enqueued_emailsGeorge Claghorn2015-01-081-0/+47
|
* Remove deprecated ActionMailer deliver & deliver!claudiob2015-01-041-19/+0
| | | | | These methods were deprecated in Rails 4.2 (see f4ee1147) so they can be safely removed in Rails 5.0.
* Template lookup now respect default locale and I18n fallbacks.Rafael Mendonça França2014-12-293-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | Given the following templates: mailer/demo.html.erb mailer/demo.en.html.erb mailer/demo.pt.html.erb Before this change for a locale that doesn't have its related file the `mailer/demo.html.erb` will be rendered even if `en` is the default locale. Now `mailer/demo.en.html.erb` has precedence over the file without locale. Also, it is possible to give a fallback. mailer/demo.pt.html.erb mailer/demo.pt-BR.html.erb So if the locale is `pt-PT`, `mailer/demo.pt.html.erb` will be rendered given the right I18n fallback configuration. Fixes #11884.
* let the AM test suite pass in 1.9Xavier Noria2014-11-241-2/+2
|
* let mailer templates generate URLs by default [Xavier Noria, Richard Schneeman]Xavier Noria2014-11-242-0/+61
|
* Only include the needed assertionsRafael Mendonça França2014-10-071-1/+1
|
* fix tests on action_mailerschneems2014-10-073-6/+8
| | | Include appropriate helpers and use `assert_dom_equal` where applicable
* Allow attaching files while the mail view is renderedChristian Felder (masone)2014-09-222-0/+21
|
* Default to sorting user's test cases for nowGodfrey Chan2014-09-081-1/+1
| | | | | | | | | | | Goals: 1. Default to :random for newly generated applications 2. Default to :sorted for existing applications with a warning 3. Only show the warning once 4. Only show the warning if the app actually uses AS::TestCase Fixes #16769
* Rename remaining :in / :at to :wait / :wait_untilCristian Bica2014-09-041-3/+5
|
* Active Job refactoringCristian Bica2014-09-031-12/+12
|
* Leave all our tests as order_dependent! for nowMatthew Draper2014-09-021-0/+5
| | | | | | | | | We're seeing too many failures to believe otherwise. This reverts commits bc116a55ca3dd9f63a1f1ca7ade3623885adcc57, cbde413df3839e06dd14e3c220e9800af91e83ab, bf0a67931dd8e58f6f878b9510ae818ae1f29a3a, and 2440933fe2c27b27bcafcd9019717800db2641aa.
* [ActionMailer] Rename test/test_test to test/test_case_testAbdelkader Boudih2014-08-301-0/+0
|
* Make test:isolated run without bundler for Action MailerRobin Dupret2014-08-291-3/+2
| | | | | | | | Action Mailer tests weren't able to run in isolation without the bundle exec prefix since we were requiring gems before requiring abstract_unit. We don't need the `gem` call thus and the require_relative since the test directory should be present in the load path when we run any test.
* Fix SyntaxErrorAkira Matsuda2014-08-211-1/+1
|
* Deprecated .deliver / .deliver! to .deliver_now / .deliver_now!Cristian Bica2014-08-208-51/+70
|
* Clear deliveries in order not to affect other testsAkira Matsuda2014-08-201-2/+4
|
* Remove global helpers from the ActionMailer test suite.Lucas Mazza2014-08-192-13/+1
|
* Merge branch 'master' into loofahRafael Mendonça França2014-08-174-8/+93
|\ | | | | | | | | Conflicts: actionpack/CHANGELOG.md
| * [ActiveJob] Use globalid gemAbdelkader Boudih2014-08-171-1/+0
| |
| * [ActionMailer] Rename ActionMailer::DelayedDeliveryJob to ↵Abdelkader Boudih2014-08-171-4/+4
| | | | | | | | ActionMailer::DeliveryJob
| * [ActiveJob] Fix test syntaxAbdelkader Boudih2014-08-171-10/+10
| |
| * Refactor DeliverLater into MessageDeliveryAbdelkader Boudih2014-08-142-10/+11
| |
| * Merge branch 'master' into activejobCristian Bica2014-08-131-1/+3
| |\
| | * use :test delivery method for `base_test.rb`Yves Senn2014-08-132-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This solves errors like: ``` BaseTest#test_you_can_register_multiple_observers_to_the_mail_object_that_both_get_informed_on_email_delivery: Errno::ECONNREFUSED: Connection refused - connect(2) for "localhost" port 25 /Users/senny/.rbenv/versions/2.1.2/lib/ruby/2.1.0/net/smtp.rb:541:in `initialize' /Users/senny/.rbenv/versions/2.1.2/lib/ruby/2.1.0/net/smtp.rb:541:in `open' /Users/senny/.rbenv/versions/2.1.2/lib/ruby/2.1.0/net/smtp.rb:541:in `tcp_socket' /Users/senny/.rbenv/versions/2.1.2/lib/ruby/2.1.0/net/smtp.rb:551:in `block in do_start' /Users/senny/.rbenv/versions/2.1.2/lib/ruby/2.1.0/timeout.rb:91:in `block in timeout' /Users/senny/.rbenv/versions/2.1.2/lib/ruby/2.1.0/timeout.rb:101:in `call' /Users/senny/.rbenv/versions/2.1.2/lib/ruby/2.1.0/timeout.rb:101:in `timeout' /Users/senny/.rbenv/versions/2.1.2/lib/ruby/2.1.0/net/smtp.rb:550:in `do_start' /Users/senny/.rbenv/versions/2.1.2/lib/ruby/2.1.0/net/smtp.rb:520:in `start' /Users/senny/Projects/rails/.bundle/gems/mail-2.6.1/lib/mail/network/delivery_methods/smtp.rb:112:in `deliver!' /Users/senny/Projects/rails/.bundle/gems/mail-2.6.1/lib/mail/message.rb:2136:in `do_delivery' /Users/senny/Projects/rails/.bundle/gems/mail-2.6.1/lib/mail/message.rb:232:in `block in deliver' /Users/senny/Projects/rails/actionmailer/lib/action_mailer/base.rb:528:in `block in deliver_mail' /Users/senny/Projects/rails/activesupport/lib/active_support/notifications.rb:164:in `block in instrument' /Users/senny/Projects/rails/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/senny/Projects/rails/activesupport/lib/active_support/notifications.rb:164:in `instrument' /Users/senny/Projects/rails/actionmailer/lib/action_mailer/base.rb:526:in `deliver_mail' /Users/senny/Projects/rails/.bundle/gems/mail-2.6.1/lib/mail/message.rb:232:in `deliver' /Users/senny/Projects/rails/actionmailer/test/base_test.rb:598:in `block (2 levels) in <class:BaseTest>' /Users/senny/Projects/rails/actionmailer/test/base_test.rb:801:in `mail_side_effects' /Users/senny/Projects/rails/actionmailer/test/base_test.rb:593:in `block in <class:BaseTest>' ``` where the `:smtp` delivery method was leaked over to other test cases.
| | * actionmailer_tests_are_order_dependent!Akira Matsuda2014-08-131-0/+5
| | |
| | * AM, AP, AV, and AMo tests are already order_independent!Akira Matsuda2014-08-131-5/+0
| | |
| * | Added ActionMailer::DeliverLaterAbdelkader Boudih2014-08-132-0/+88
| | |
* | | Merge branch 'master' into loofahRafael Mendonça França2014-08-122-0/+46
|\ \ \ | | |/ | |/| | | | | | | | | | | | | Conflicts: actionpack/CHANGELOG.md actionpack/test/controller/integration_test.rb actionview/CHANGELOG.md
| * | Nobody sucks so nobody should call this awful method nameRafael Mendonça França2014-08-121-1/+1
| | |
| * | users_dont_suck_but_only_we_suck_and_only_our_tests_are_order_dependent!Akira Matsuda2014-08-121-0/+5
| |/ | | | | | | | | Calling ActiveSupport::TestCase.i_suck_and_my_tests_are_order_dependent! in AS::TestCase makes everyone's tests order dependent, which should never be done by the framework.
| * Raise an exception when attachments are added after `mail` was called.Yves Senn2014-07-291-0/+39
| | | | | | | | | | | | | | | | | | Closes #16163 Adding attachments after a call to `mail` will result in invalid emails. This is related to the fact, that `mail` is making the required preparations before the email is ready to be sent. These change depending on your added attachments.
| * Stop requiring mocha automaticallyRafael Mendonça França2014-07-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | We are planning to remove mocha from our test suite because of performance problems. To make this possible we should stop require mocha on ActionSupport::TestCase. This should not affect applications since users still need to add mocha to Gemfile and this already load mocha. Added FIXME notes to place that still need mocha removal
* | Include the selector assertions on the test caseRafael Mendonça França2014-07-151-3/+0
| | | | | | | | | | We don't need to require users to include this module on ActionMailer::TestCase
* | Rails is a module not a classRafael Mendonça França2014-07-151-1/+1
| |
* | Merge pull request #11218 from kaspth/loofah-integrationRafael Mendonça França2014-07-101-0/+50
|\ \ | |/ |/| | | | | | | | | | | Loofah-integration Conflicts: actionpack/CHANGELOG.md actionview/CHANGELOG.md
| * Inline Assertion reference.Timm2014-06-161-3/+4
| |
| * Remove response faking.Timm2014-06-161-15/+1
| |
| * Use 1.9 syntax.Timm2014-06-161-6/+6
| |
| * Added rails-dom-testing and rails-html-sanitizer to Gemfile. Added tests for ↵Timm2014-06-161-0/+63
| | | | | | | | assert_select_email.
* | test i18n against a routed appAaron Patterson2014-07-071-1/+16
| |
* | add test coverage for the action mailerDmitry Polushkin2014-07-046-38/+16
| |
* | Add unregister_template_handler to prevent leaks.Zuhao Wan2014-06-121-4/+0
|/
* Restore I18n.locale to default after test.Zuhao Wan2014-06-071-0/+4
| | | | | | | | | | If i18n_with_controller_test.rb were to run first, the I18n.locale will be changed to :de, and the following tests in base_test.rb will fail: "subject gets default from I18n" “default subject can have interpolations” "translations are scoped properly" "implicit multipart with default locale"
* Merge pull request #15083 from ↵Yves Senn2014-05-131-11/+14
|\ | | | | | | | | zuhao/refactor_actionmailer_i18n_with_controller_test Use with_translation helper to clean up I18n stored translations.
| * Use with_translation helper to clean up I18n stored translations.Zuhao Wan2014-05-131-11/+14
| |