From dbaea7c59937c9d5711ec1b76eabbfae454b01af Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Fri, 13 Sep 2019 08:51:46 +0000 Subject: [PATCH] mail_body method in test/test_helper.rb raises an exception if the message is not multipart (#32025). This change fixes random test failures. git-svn-id: http://svn.redmine.org/redmine/trunk@18465 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/test_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_helper.rb b/test/test_helper.rb index 390ea92b4..6a6fd7fa5 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -250,7 +250,7 @@ class ActiveSupport::TestCase end def mail_body(mail) - mail.parts.first.body.encoded + (mail.multipart? ? mail.parts.first : mail).body.encoded end # Returns the lft value for a new root issue