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
This commit is contained in:
Toshi MARUYAMA 2014-01-09 06:43:33 +00:00
parent 3ca03beb6f
commit d305d15373
1 changed files with 2 additions and 2 deletions

View 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