From 394628f2054d41c99ee24d8d8a622a5cb9c7e0bf Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 9 Jan 2014 04:23:19 +0000 Subject: [PATCH] Rails4: replace deprecated Relation#first with finder options at MailHandlerTest git-svn-id: http://svn.redmine.org/redmine/trunk@12551 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/mail_handler_test.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb index f6ba8b0f7..570cdd662 100644 --- a/test/unit/mail_handler_test.rb +++ b/test/unit/mail_handler_test.rb @@ -663,7 +663,7 @@ class MailHandlerTest < ActiveSupport::TestCase end end end - journal = Journal.first(:order => 'id DESC') + journal = Journal.order('id DESC').first assert_equal Issue.find(2), journal.journalized assert_equal 1, journal.details.size @@ -846,8 +846,7 @@ class MailHandlerTest < ActiveSupport::TestCase :unknown_user => 'create' ) end - - user = User.first(:order => 'id DESC') + user = User.order('id DESC').first assert_equal "foo@example.org", user.mail str1 = "\xc3\x84\xc3\xa4" str2 = "\xc3\x96\xc3\xb6" -- 2.39.5