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:
parent
3ca03beb6f
commit
d305d15373
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue