]> source.dussan.org Git - redmine.git/commitdiff
Rails4: replace deprecated Relation#first with finder options at UserTest
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 9 Jan 2014 06:43:33 +0000 (06:43 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 9 Jan 2014 06:43:33 +0000 (06:43 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@12564 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/user_test.rb

index 20140957e432f5cba5aaf9f84b8a666ecd8e9208..b743e46c2418247477dd658c56293639ff0d09cb 100644 (file)
@@ -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