From 505483f22493feabc4cd1bbf0a822e7828903bf8 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 10 Jan 2014 11:24:00 +0000 Subject: [PATCH] Rails4: replace deprecated Relation#first with finder options at ApiTest::ProjectsTest git-svn-id: http://svn.redmine.org/redmine/trunk@12605 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/integration/api_test/projects_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/integration/api_test/projects_test.rb b/test/integration/api_test/projects_test.rb index 1ff180540..723e783b1 100644 --- a/test/integration/api_test/projects_test.rb +++ b/test/integration/api_test/projects_test.rb @@ -140,7 +140,7 @@ class Redmine::ApiTest::ProjectsTest < Redmine::ApiTest::Base credentials('admin') end - project = Project.first(:order => 'id DESC') + project = Project.order('id DESC').first assert_equal 'API test', project.name assert_equal 'api-test', project.identifier assert_equal ['issue_tracking', 'repository'], project.enabled_module_names.sort @@ -158,7 +158,7 @@ class Redmine::ApiTest::ProjectsTest < Redmine::ApiTest::Base credentials('admin') end - project = Project.first(:order => 'id DESC') + project = Project.order('id DESC').first assert_equal ['issue_tracking', 'news', 'time_tracking'], project.enabled_module_names.sort end @@ -169,7 +169,7 @@ class Redmine::ApiTest::ProjectsTest < Redmine::ApiTest::Base credentials('admin') end - project = Project.first(:order => 'id DESC') + project = Project.order('id DESC').first assert_equal [1, 3], project.trackers.map(&:id).sort end