diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-10 11:24:34 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-10 11:24:34 +0000 |
commit | 7f93cc74b4be79ac74929429893727dac4d873d2 (patch) | |
tree | 978a8528f3b692ececd29ac9c1780b2b5e5c83f5 /test/integration | |
parent | 505483f22493feabc4cd1bbf0a822e7828903bf8 (diff) | |
download | redmine-7f93cc74b4be79ac74929429893727dac4d873d2.tar.gz redmine-7f93cc74b4be79ac74929429893727dac4d873d2.zip |
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
Diffstat (limited to 'test/integration')
-rw-r--r-- | test/integration/api_test/time_entries_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/integration/api_test/time_entries_test.rb b/test/integration/api_test/time_entries_test.rb index 6d77f0c81..470d94ad5 100644 --- a/test/integration/api_test/time_entries_test.rb +++ b/test/integration/api_test/time_entries_test.rb @@ -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 |