diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-08 06:26:25 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-08 06:26:25 +0000 |
commit | 184ea832d6012cd24d4edd836ca71fe7c8d5199e (patch) | |
tree | 653ea5ed90d4d88d2a03a055e8306feea024f50b /test/functional/news_controller_test.rb | |
parent | 4f28ed2fb48b26815f41627e89e908d63a81d162 (diff) | |
download | redmine-184ea832d6012cd24d4edd836ca71fe7c8d5199e.tar.gz redmine-184ea832d6012cd24d4edd836ca71fe7c8d5199e.zip |
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
Diffstat (limited to 'test/functional/news_controller_test.rb')
-rw-r--r-- | test/functional/news_controller_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/news_controller_test.rb b/test/functional/news_controller_test.rb index 43ae05a5f..5320cd293 100644 --- a/test/functional/news_controller_test.rb +++ b/test/functional/news_controller_test.rb @@ -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 |