diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-10 08:38:59 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-10 08:38:59 +0000 |
commit | 1c938cd1d3d27f0708c6617fd3dcf5a943affa04 (patch) | |
tree | 0c1670698ce0cbf122b73e4e1792fa66e38e293a /test/integration/api_test/issues_test.rb | |
parent | b6d6325198130308f7bb928c317d34d8dbbad43d (diff) | |
download | redmine-1c938cd1d3d27f0708c6617fd3dcf5a943affa04.tar.gz redmine-1c938cd1d3d27f0708c6617fd3dcf5a943affa04.zip |
Rails4: replace deprecated Relation#first with finder options at ApiTest::IssuesTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12598 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration/api_test/issues_test.rb')
-rw-r--r-- | test/integration/api_test/issues_test.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/integration/api_test/issues_test.rb b/test/integration/api_test/issues_test.rb index a8839a391..368e424f8 100644 --- a/test/integration/api_test/issues_test.rb +++ b/test/integration/api_test/issues_test.rb @@ -504,7 +504,7 @@ class Redmine::ApiTest::IssuesTest < Redmine::ApiTest::Base {:issue => {:project_id => 1, :subject => 'API test', :tracker_id => 2, :status_id => 3}}, credentials('jsmith') end - issue = Issue.first(:order => 'id DESC') + issue = Issue.order('id DESC').first assert_equal 1, issue.project_id assert_equal 2, issue.tracker_id assert_equal 3, issue.status_id @@ -553,7 +553,7 @@ class Redmine::ApiTest::IssuesTest < Redmine::ApiTest::Base credentials('jsmith') end - issue = Issue.first(:order => 'id DESC') + issue = Issue.order('id DESC').first assert_equal 1, issue.project_id assert_equal 2, issue.tracker_id assert_equal 3, issue.status_id @@ -804,7 +804,7 @@ class Redmine::ApiTest::IssuesTest < Redmine::ApiTest::Base end xml = Hash.from_xml(response.body) token = xml['upload']['token'] - attachment = Attachment.first(:order => 'id DESC') + attachment = Attachment.order('id DESC').first # create the issue with the upload's token assert_difference 'Issue.count' do @@ -815,7 +815,7 @@ class Redmine::ApiTest::IssuesTest < Redmine::ApiTest::Base credentials('jsmith') assert_response :created end - issue = Issue.first(:order => 'id DESC') + issue = Issue.order('id DESC').first assert_equal 1, issue.attachments.count assert_equal attachment, issue.attachments.first @@ -850,7 +850,7 @@ class Redmine::ApiTest::IssuesTest < Redmine::ApiTest::Base end xml = Hash.from_xml(response.body) token = xml['upload']['token'] - attachment = Attachment.first(:order => 'id DESC') + attachment = Attachment.order('id DESC').first # update the issue with the upload's token assert_difference 'Journal.count' do |