diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-10 04:11:53 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-10 04:11:53 +0000 |
commit | c7723e9bc980bc118ececa1e7bd59531ef927359 (patch) | |
tree | 5c9fa2405c379fda9af65a31e36201f141be2bd2 /test | |
parent | ee49bdd81bc8e5606c9518d006aed03bc39eab76 (diff) | |
download | redmine-c7723e9bc980bc118ececa1e7bd59531ef927359.tar.gz redmine-c7723e9bc980bc118ececa1e7bd59531ef927359.zip |
Rails4: replace deprecated Relation#first with finder options at IssueRelationsControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12584 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/issue_relations_controller_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/issue_relations_controller_test.rb b/test/functional/issue_relations_controller_test.rb index 836bb2489..cede54534 100644 --- a/test/functional/issue_relations_controller_test.rb +++ b/test/functional/issue_relations_controller_test.rb @@ -41,7 +41,7 @@ class IssueRelationsControllerTest < ActionController::TestCase post :create, :issue_id => 1, :relation => {:issue_to_id => '2', :relation_type => 'relates', :delay => ''} end - relation = IssueRelation.first(:order => 'id DESC') + relation = IssueRelation.order('id DESC').first assert_equal 1, relation.issue_from_id assert_equal 2, relation.issue_to_id assert_equal 'relates', relation.relation_type @@ -54,7 +54,7 @@ class IssueRelationsControllerTest < ActionController::TestCase assert_template 'create' assert_equal 'text/javascript', response.content_type end - relation = IssueRelation.first(:order => 'id DESC') + relation = IssueRelation.order('id DESC').first assert_equal 3, relation.issue_from_id assert_equal 1, relation.issue_to_id @@ -66,7 +66,7 @@ class IssueRelationsControllerTest < ActionController::TestCase post :create, :issue_id => 1, :relation => {:issue_to_id => '#2', :relation_type => 'relates', :delay => ''} end - relation = IssueRelation.first(:order => 'id DESC') + relation = IssueRelation.order('id DESC').first assert_equal 2, relation.issue_to_id end @@ -75,7 +75,7 @@ class IssueRelationsControllerTest < ActionController::TestCase post :create, :issue_id => 1, :relation => {:issue_to_id => ' 2 ', :relation_type => 'relates', :delay => ''} end - relation = IssueRelation.first(:order => 'id DESC') + relation = IssueRelation.order('id DESC').first assert_equal 2, relation.issue_to_id end |