From: Toshi MARUYAMA Date: Thu, 9 Jan 2014 06:43:33 +0000 (+0000) Subject: Rails4: replace deprecated Relation#first with finder options at UserTest X-Git-Tag: 2.5.0~335 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d305d15373ddd807621794497847284adddcd3e5;p=redmine.git Rails4: replace deprecated Relation#first with finder options at UserTest git-svn-id: http://svn.redmine.org/redmine/trunk@12564 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb index 20140957e..b743e46c2 100644 --- a/test/unit/user_test.rb +++ b/test/unit/user_test.rb @@ -257,7 +257,7 @@ class UserTest < ActiveSupport::TestCase assert_difference 'JournalDetail.count' do issue.save! end - journal_detail = JournalDetail.first(:order => 'id DESC') + journal_detail = JournalDetail.order('id DESC').first assert_equal '2', journal_detail.old_value User.find(2).destroy @@ -273,7 +273,7 @@ class UserTest < ActiveSupport::TestCase assert_difference 'JournalDetail.count' do issue.save! end - journal_detail = JournalDetail.first(:order => 'id DESC') + journal_detail = JournalDetail.order('id DESC').first assert_equal '2', journal_detail.value User.find(2).destroy