]> source.dussan.org Git - redmine.git/commitdiff
Rails4: replace deprecated Relation#first with finder options at AttachmentTest
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 8 Jan 2014 02:49:09 +0000 (02:49 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 8 Jan 2014 02:49:09 +0000 (02:49 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@12500 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/attachment_test.rb

index c9100f3d0e75fd98cb52e2024e2c2a4849d5f550..52283c7957df54d2fef2960725d4e7a41c724cc2 100644 (file)
@@ -214,8 +214,7 @@ class AttachmentTest < ActiveSupport::TestCase
           'description' => 'test'
         })
     end
-
-    attachment = Attachment.first(:order => 'id DESC')
+    attachment = Attachment.order('id DESC').first
     assert_equal issue, attachment.container
     assert_equal 'testfile.txt', attachment.filename
     assert_equal 59, attachment.filesize