]> source.dussan.org Git - redmine.git/commitdiff
Rails4: replace deprecated Relation#first with finder options at DocumentsControllerTest
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 8 Jan 2014 04:32:00 +0000 (04:32 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 8 Jan 2014 04:32:00 +0000 (04:32 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@12507 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/documents_controller_test.rb

index 7fb7bdaf78871964144f1aeea0d839433f799254..ea247ac015657d3ef6b35d1681aa4579d67d4416 100644 (file)
@@ -180,7 +180,7 @@ LOREM
       post :add_attachment, :id => 1,
         :attachments => {'1' => {'file' => uploaded_test_file('testfile.txt', 'text/plain')}}
     end
-    attachment = Attachment.first(:order => 'id DESC')
+    attachment = Attachment.order('id DESC').first
     assert_equal Document.find(1), attachment.container
   end
 end