summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-10 08:37:33 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-10 08:37:33 +0000
commitc020578820ec1a569513ed8a8bea2d74e5541f9e (patch)
tree445356871cd6cba225bff36686afdbd350a02caf /test
parentb652f7fc276778f50297431f19320ed7f29468f2 (diff)
downloadredmine-c020578820ec1a569513ed8a8bea2d74e5541f9e.tar.gz
redmine-c020578820ec1a569513ed8a8bea2d74e5541f9e.zip
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
Diffstat (limited to 'test')
-rw-r--r--test/integration/api_test/attachments_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/integration/api_test/attachments_test.rb b/test/integration/api_test/attachments_test.rb
index af2f063fa..5bf2ea06a 100644
--- a/test/integration/api_test/attachments_test.rb
+++ b/test/integration/api_test/attachments_test.rb
@@ -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