Rails4: replace deprecated Relation#first with finder options at ApiTest::AttachmentsTest

git-svn-id: http://svn.redmine.org/redmine/trunk@12595 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2014-01-10 08:37:33 +00:00
parent b652f7fc27
commit c020578820
1 changed files with 2 additions and 2 deletions

View File

@ -87,7 +87,7 @@ class Redmine::ApiTest::AttachmentsTest < Redmine::ApiTest::Base
token = xml['upload']['token']
assert_not_nil token
attachment = Attachment.first(:order => 'id DESC')
attachment = Attachment.order('id DESC').first
assert_equal token, attachment.token
assert_nil attachment.container
assert_equal 2, attachment.author_id
@ -112,7 +112,7 @@ class Redmine::ApiTest::AttachmentsTest < Redmine::ApiTest::Base
token = json['upload']['token']
assert_not_nil token
attachment = Attachment.first(:order => 'id DESC')
attachment = Attachment.order('id DESC').first
assert_equal token, attachment.token
end