diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-10 11:25:25 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-10 11:25:25 +0000 |
commit | ea9b40ab4de9238f8c1d7e0b3db92bab9de65383 (patch) | |
tree | 000405d24239075763f1364c00fa7c7d94a68158 /test/integration/api_test/versions_test.rb | |
parent | c538543583889fc4a3f3d644e509b66bf92a7729 (diff) | |
download | redmine-ea9b40ab4de9238f8c1d7e0b3db92bab9de65383.tar.gz redmine-ea9b40ab4de9238f8c1d7e0b3db92bab9de65383.zip |
Rails4: replace deprecated Relation#first with finder options at ApiTest::VersionsTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12608 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration/api_test/versions_test.rb')
-rw-r--r-- | test/integration/api_test/versions_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/integration/api_test/versions_test.rb b/test/integration/api_test/versions_test.rb index e4948a3a8..782ad4c8b 100644 --- a/test/integration/api_test/versions_test.rb +++ b/test/integration/api_test/versions_test.rb @@ -56,7 +56,7 @@ class Redmine::ApiTest::VersionsTest < Redmine::ApiTest::Base post '/projects/1/versions.xml', {:version => {:name => 'API test'}}, credentials('jsmith') end - version = Version.first(:order => 'id DESC') + version = Version.order('id DESC').first assert_equal 'API test', version.name assert_response :created @@ -69,7 +69,7 @@ class Redmine::ApiTest::VersionsTest < Redmine::ApiTest::Base post '/projects/1/versions.xml', {:version => {:name => 'API test', :due_date => '2012-01-24'}}, credentials('jsmith') end - version = Version.first(:order => 'id DESC') + version = Version.order('id DESC').first assert_equal 'API test', version.name assert_equal Date.parse('2012-01-24'), version.due_date |