aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2017-04-27 02:05:00 -0700
committerRafael Mendonça França <rafaelmfranca@gmail.com>2017-04-27 02:05:00 -0700
commit0d35a60ff766e901112afeec157c7cbb0f73631e (patch)
treee2abefdcd6178ab1165106f372e2c994aa52952d /actionmailer
parentee9e08679ab1dc60852236741f73ff82b6d96302 (diff)
downloadrails-0d35a60ff766e901112afeec157c7cbb0f73631e.tar.gz
rails-0d35a60ff766e901112afeec157c7cbb0f73631e.tar.bz2
rails-0d35a60ff766e901112afeec157c7cbb0f73631e.zip
Avoid stubing on this test
This will avoid to the test fail when running in isolation because the message generated is nil.
Diffstat (limited to 'actionmailer')
-rw-r--r--actionmailer/test/base_test.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb
index ebb97078e6..af1c2f44a5 100644
--- a/actionmailer/test/base_test.rb
+++ b/actionmailer/test/base_test.rb
@@ -979,8 +979,7 @@ class BasePreviewTest < ActiveSupport::TestCase
test "has access to params" do
params = { name: "World" }
- assert_called_with(BaseMailer, :welcome, [params]) do
- BaseMailerPreview.call(:welcome, params)
- end
+ message = BaseMailerPreview.call(:welcome, params)
+ assert_equal "World", message["name"].decoded
end
end