mirror of
https://github.com/redmine/redmine.git
synced 2026-01-18 13:33:04 +01:00
Rails4: replace deprecated Relation#first with finder options at NewsControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12522 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -102,8 +102,8 @@ class NewsControllerTest < ActionController::TestCase
|
||||
:attachments => {'1' => {'file' => uploaded_test_file('testfile.txt', 'text/plain')}}
|
||||
end
|
||||
end
|
||||
attachment = Attachment.first(:order => 'id DESC')
|
||||
news = News.first(:order => 'id DESC')
|
||||
attachment = Attachment.order('id DESC').first
|
||||
news = News.order('id DESC').first
|
||||
assert_equal news, attachment.container
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user