]> source.dussan.org Git - redmine.git/commitdiff
cleanup: rubocop: fix Lint/ParenthesesAsGroupedExpression in test/functional/email_ad...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 24 Nov 2019 16:44:18 +0000 (16:44 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 24 Nov 2019 16:44:18 +0000 (16:44 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@19267 e93f8b46-1217-0410-a6f0-8f06a7374b81

.rubocop_todo.yml
test/functional/email_addresses_controller_test.rb

index df5bd12c776b0dd576925719d7725fa552e82984..332554305d8e2e4470196102218396337917cab7 100644 (file)
@@ -384,7 +384,6 @@ Lint/Loop:
 
 Lint/ParenthesesAsGroupedExpression:
   Exclude:
-    - 'test/functional/email_addresses_controller_test.rb'
     - 'test/functional/my_controller_test.rb'
     - 'test/functional/settings_controller_test.rb'
     - 'test/functional/users_controller_test.rb'
index ac11ec383a9c2c14d6a580945c2f491717af4b2f..08932236f2962da4eef9f74f34bf068844b18571 100644 (file)
@@ -127,8 +127,8 @@ class EmailAddressesControllerTest < Redmine::ControllerTest
           :address => 'something@example.fr'
         }
       }
-
-    assert_not_nil (mail = ActionMailer::Base.deliveries.last)
+    mail = ActionMailer::Base.deliveries.last
+    assert_not_nil mail
     assert_mail_body_match '0.0.0.0', mail
     assert_mail_body_match I18n.t(:mail_body_security_notification_add, field: I18n.t(:field_mail), value: 'something@example.fr'), mail
     assert_select_email do
@@ -179,8 +179,8 @@ class EmailAddressesControllerTest < Redmine::ControllerTest
         :notify => '0'
       },
       :xhr => true
-
-    assert_not_nil (mail = ActionMailer::Base.deliveries.last)
+    mail = ActionMailer::Base.deliveries.last
+    assert_not_nil mail
     assert_mail_body_match I18n.t(:mail_body_security_notification_notify_disabled, value: 'another@somenet.foo'), mail
 
     # The changed address should be notified for security purposes
@@ -237,8 +237,8 @@ class EmailAddressesControllerTest < Redmine::ControllerTest
         :id => email.id
       },
       :xhr => true
-
-    assert_not_nil (mail = ActionMailer::Base.deliveries.last)
+    mail = ActionMailer::Base.deliveries.last
+    assert_not_nil mail
     assert_mail_body_match I18n.t(:mail_body_security_notification_remove, field: I18n.t(:field_mail), value: 'another@somenet.foo'), mail
 
     # The removed address should be notified for security purposes