summaryrefslogtreecommitdiffstats
path: root/test/functional/news_controller_test.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-08 06:23:43 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-08 06:23:43 +0000
commit4f28ed2fb48b26815f41627e89e908d63a81d162 (patch)
tree3457e9c8d5f3accbd2ae7f67d7c1068755a729e4 /test/functional/news_controller_test.rb
parent273e7420d4913b01f73242cae693ba6069702a2a (diff)
downloadredmine-4f28ed2fb48b26815f41627e89e908d63a81d162.tar.gz
redmine-4f28ed2fb48b26815f41627e89e908d63a81d162.zip
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
Diffstat (limited to 'test/functional/news_controller_test.rb')
-rw-r--r--test/functional/news_controller_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/functional/news_controller_test.rb b/test/functional/news_controller_test.rb
index 65ee30e4b..43ae05a5f 100644
--- a/test/functional/news_controller_test.rb
+++ b/test/functional/news_controller_test.rb
@@ -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