diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-11 10:12:49 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-11 10:12:49 +0000 |
commit | 190bb9af30481bb3cbae3f7c193379495b97efbc (patch) | |
tree | 019ba4629b23bc4f23ac224963019db0ec7e2758 /test | |
parent | 1bb79568e5ab5f2a06f5a61e5b157eb008cf3e98 (diff) | |
download | redmine-190bb9af30481bb3cbae3f7c193379495b97efbc.tar.gz redmine-190bb9af30481bb3cbae3f7c193379495b97efbc.zip |
Rails4: replace deprecated Relation#first with finder options at IssuesControllerTransactionTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12638 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/issues_controller_transaction_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/issues_controller_transaction_test.rb b/test/functional/issues_controller_transaction_test.rb index 002b854f8..0f06633a4 100644 --- a/test/functional/issues_controller_transaction_test.rb +++ b/test/functional/issues_controller_transaction_test.rb @@ -102,7 +102,7 @@ class IssuesControllerTransactionTest < ActionController::TestCase assert_response :success assert_template 'edit' - attachment = Attachment.first(:order => 'id DESC') + attachment = Attachment.order('id DESC').first assert_tag 'input', :attributes => {:name => 'attachments[p0][token]', :value => attachment.token} assert_tag 'input', :attributes => {:name => 'attachments[p0][filename]', :value => 'testfile.txt'} end @@ -189,7 +189,7 @@ class IssuesControllerTransactionTest < ActionController::TestCase assert_response 302 issue = Issue.find(1) assert_equal 4, issue.fixed_version_id - journal = Journal.first(:order => 'id DESC') + journal = Journal.order('id DESC').first assert_equal 'overwrite_conflict_resolution', journal.notes assert journal.details.any? end @@ -210,7 +210,7 @@ class IssuesControllerTransactionTest < ActionController::TestCase assert_response 302 issue = Issue.find(1) assert_nil issue.fixed_version_id - journal = Journal.first(:order => 'id DESC') + journal = Journal.order('id DESC').first assert_equal 'add_notes_conflict_resolution', journal.notes assert journal.details.empty? end |