Rails4: replace deprecated Relation#first with finder options at ApiTest::TimeEntriesTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12606 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
505483f224
commit
7f93cc74b4
|
@ -62,7 +62,7 @@ class Redmine::ApiTest::TimeEntriesTest < Redmine::ApiTest::Base
|
|||
assert_response :created
|
||||
assert_equal 'application/xml', @response.content_type
|
||||
|
||||
entry = TimeEntry.first(:order => 'id DESC')
|
||||
entry = TimeEntry.order('id DESC').first
|
||||
assert_equal 'jsmith', entry.user.login
|
||||
assert_equal Issue.find(1), entry.issue
|
||||
assert_equal Project.find(1), entry.project
|
||||
|
@ -82,7 +82,7 @@ class Redmine::ApiTest::TimeEntriesTest < Redmine::ApiTest::Base
|
|||
assert_response :created
|
||||
assert_equal 'application/xml', @response.content_type
|
||||
|
||||
entry = TimeEntry.first(:order => 'id DESC')
|
||||
entry = TimeEntry.order('id DESC').first
|
||||
assert_equal 'accepted', entry.custom_field_value(field)
|
||||
end
|
||||
|
||||
|
@ -93,7 +93,7 @@ class Redmine::ApiTest::TimeEntriesTest < Redmine::ApiTest::Base
|
|||
assert_response :created
|
||||
assert_equal 'application/xml', @response.content_type
|
||||
|
||||
entry = TimeEntry.first(:order => 'id DESC')
|
||||
entry = TimeEntry.order('id DESC').first
|
||||
assert_equal 'jsmith', entry.user.login
|
||||
assert_nil entry.issue
|
||||
assert_equal Project.find(1), entry.project
|
||||
|
|
Loading…
Reference in New Issue