diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-02-17 17:44:29 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-17 17:44:29 +0900 |
commit | 78d23d820a91c1259ff28ee2ba1b5b99263694ff (patch) | |
tree | 88ae5976d6960365997179386638862205321008 /actionmailer/test/base_test.rb | |
parent | 5ca19efafea08984ff1c464c64969f82b9db3569 (diff) | |
parent | ed3f3159072a36709e5de5d9693baf3387258ab5 (diff) | |
download | rails-78d23d820a91c1259ff28ee2ba1b5b99263694ff.tar.gz rails-78d23d820a91c1259ff28ee2ba1b5b99263694ff.tar.bz2 rails-78d23d820a91c1259ff28ee2ba1b5b99263694ff.zip |
Merge pull request #35302 from yhirano55/auto_correct_rubocop_offenses
Auto correct rubocop offenses
Diffstat (limited to 'actionmailer/test/base_test.rb')
-rw-r--r-- | actionmailer/test/base_test.rb | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 15613d4dce..531bf58ea9 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -914,20 +914,18 @@ class BaseTest < ActiveSupport::TestCase end test "notification for deliver" do - begin - events = [] - ActiveSupport::Notifications.subscribe("deliver.action_mailer") do |*args| - events << ActiveSupport::Notifications::Event.new(*args) - end + events = [] + ActiveSupport::Notifications.subscribe("deliver.action_mailer") do |*args| + events << ActiveSupport::Notifications::Event.new(*args) + end - BaseMailer.welcome(body: "Hello there").deliver_now + BaseMailer.welcome(body: "Hello there").deliver_now - assert_equal 1, events.length - assert_equal "deliver.action_mailer", events[0].name - assert_not_nil events[0].payload[:message_id] - ensure - ActiveSupport::Notifications.unsubscribe "deliver.action_mailer" - end + assert_equal 1, events.length + assert_equal "deliver.action_mailer", events[0].name + assert_not_nil events[0].payload[:message_id] + ensure + ActiveSupport::Notifications.unsubscribe "deliver.action_mailer" end private |