| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| | |
method_call_assertions
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
xijo/action_mailer_message_delivery_respects_i18n_locale"
This reverts commit f2a8c23654d69dd8f294971487b5abf0e5d891c3, reversing
changes made to 3046c9bbe154aa717a5147091be8b495ed8969c4.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When #deliver_now is called all translations within the
generated email will be looked up for the current I18n
locale.
I18n.locale = ‘de’
mail.deliver_now # Generates german email, correct
In #enqueue_delivery the locale was not considered and
the resulting job uses the default locale.
I18n.locale = ‘de’
mail.deliver_later # Generate english email, incorrect
In order to achieve a consistent behaviour the current locale
is now always passed to `ActionMailer::DeliveryJob`.
|
|\ \
| | |
| | |
| | |
| | |
| | | |
chrismcg/allow_deliver_later_queue_name_to_be_configured
Allow configuration of ActionMailer queue name
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
```
it added in this commit (https://github.com/rails/rails/commit/2a25c4ce6da6ea23ebdf44e7eb2d2441dbea20a1), now no warnings occur.
```
|
| | |
| | |
| | |
| | |
| | | |
- as core_ext is not used and test pass locally
- mail is already required in abstract_unit
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This reverts commit 2f52f969885b2834198de0045748436a4651a94e.
Conflicts:
actionmailer/test/abstract_unit.rb
actionview/test/abstract_unit.rb
activemodel/test/cases/helper.rb
activerecord/test/cases/helper.rb
activesupport/test/abstract_unit.rb
railties/test/abstract_unit.rb
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
onwards.
|
|/ /
| |
| |
| | |
ref: https://github.com/rails/rails/pull/18763#issuecomment-72349769
|
|/
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
These methods were deprecated in Rails 4.2 (see f4ee1147) so they can
be safely removed in Rails 5.0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
| |
Include appropriate helpers and use `assert_dom_equal` where applicable
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
We're seeing too many failures to believe otherwise.
This reverts commits bc116a55ca3dd9f63a1f1ca7ade3623885adcc57,
cbde413df3839e06dd14e3c220e9800af91e83ab,
bf0a67931dd8e58f6f878b9510ae818ae1f29a3a, and
2440933fe2c27b27bcafcd9019717800db2641aa.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| | |
Conflicts:
actionpack/CHANGELOG.md
|
| | |
|
| |
| |
| |
| | |
ActionMailer::DeliveryJob
|
| | |
|
| | |
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | |/
| |/|
| | |
| | |
| | |
| | | |
Conflicts:
actionpack/CHANGELOG.md
actionpack/test/controller/integration_test.rb
actionview/CHANGELOG.md
|
| | | |
|
| |/
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|