]> source.dussan.org Git - redmine.git/commitdiff
Rails4: replace deprecated Relation#first with finder options at MailHandlerTest
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 9 Jan 2014 04:23:19 +0000 (04:23 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 9 Jan 2014 04:23:19 +0000 (04:23 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@12551 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/mail_handler_test.rb

index f6ba8b0f7e0cb96e117923ad74c398341de15fd2..570cdd662dba0e010c8f87f9e0c2434ee9886ef5 100644 (file)
@@ -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"