Rails4: replace deprecated Relation#first with finder options at NewsControllerTest

git-svn-id: http://svn.redmine.org/redmine/trunk@12521 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2014-01-08 06:23:43 +00:00
parent 273e7420d4
commit 4f28ed2fb4
1 changed files with 1 additions and 1 deletions

View File

@ -144,7 +144,7 @@ class NewsControllerTest < ActionController::TestCase
:attachments => {'1' => {'file' => uploaded_test_file('testfile.txt', 'text/plain')}}
end
end
attachment = Attachment.first(:order => 'id DESC')
attachment = Attachment.order('id DESC').first
assert_equal News.find(1), attachment.container
end