diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-10 11:24:00 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-10 11:24:00 +0000 |
commit | 505483f22493feabc4cd1bbf0a822e7828903bf8 (patch) | |
tree | 7f955ab63142f8d481d76cf0db02da2f9ec55f2d /test/integration | |
parent | e03cfe1443cb99e0f5d1fbacbac01696c8ecaad3 (diff) | |
download | redmine-505483f22493feabc4cd1bbf0a822e7828903bf8.tar.gz redmine-505483f22493feabc4cd1bbf0a822e7828903bf8.zip |
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
Diffstat (limited to 'test/integration')
-rw-r--r-- | test/integration/api_test/projects_test.rb | 6 |
1 files 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 |