summaryrefslogtreecommitdiffstats
path: root/test/unit/attachment_test.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-08 02:49:09 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-08 02:49:09 +0000
commit8a6f4c3880a54be3922354588cbba0750ae301a7 (patch)
tree76a45577eadbd12522bd7d5de262dc020d28c25f /test/unit/attachment_test.rb
parent89b5518e0b3a3b6b40aca2ff1cf29208447f4966 (diff)
downloadredmine-8a6f4c3880a54be3922354588cbba0750ae301a7.tar.gz
redmine-8a6f4c3880a54be3922354588cbba0750ae301a7.zip
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
Diffstat (limited to 'test/unit/attachment_test.rb')
-rw-r--r--test/unit/attachment_test.rb3
1 files changed, 1 insertions, 2 deletions
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