From: Toshi MARUYAMA Date: Wed, 8 Jan 2014 02:49:09 +0000 (+0000) Subject: Rails4: replace deprecated Relation#first with finder options at AttachmentTest X-Git-Tag: 2.5.0~399 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8a6f4c3880a54be3922354588cbba0750ae301a7;p=redmine.git Rails4: replace deprecated Relation#first with finder options at AttachmentTest git-svn-id: http://svn.redmine.org/redmine/trunk@12500 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/test/unit/attachment_test.rb b/test/unit/attachment_test.rb index c9100f3d0..52283c795 100644 --- a/test/unit/attachment_test.rb +++ b/test/unit/attachment_test.rb @@ -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