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
This commit is contained in:
Toshi MARUYAMA 2014-01-10 11:24:00 +00:00
parent e03cfe1443
commit 505483f224
1 changed files with 3 additions and 3 deletions

View File

@ -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