Rails4: replace deprecated Relation#first with finder options at IssueTest

git-svn-id: http://svn.redmine.org/redmine/trunk@12549 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2014-01-09 04:22:47 +00:00
parent a6c18dce13
commit bb54f0b7c5
1 changed files with 2 additions and 2 deletions

View File

@ -154,7 +154,7 @@ class IssueTest < ActiveSupport::TestCase
assert Issue.new(:project_id => 2, :tracker_id => 1, :author_id => 1,
:subject => 'Group assignment',
:assigned_to_id => 11).save
issue = Issue.first(:order => 'id DESC')
issue = Issue.order('id DESC').first
assert_kind_of Group, issue.assigned_to
assert_equal Group.find(11), issue.assigned_to
end
@ -1783,7 +1783,7 @@ class IssueTest < ActiveSupport::TestCase
end
end
detail = JournalDetail.first(:order => 'id DESC')
detail = JournalDetail.order('id DESC').first
assert_equal i, detail.journal.journalized
assert_equal 'attr', detail.property
assert_equal 'description', detail.prop_key