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