diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-11 10:14:08 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-11 10:14:08 +0000 |
commit | 8f43b5307799d39019117d52ff79b6499c952594 (patch) | |
tree | bc707c7bf0dc2e75a351039a242b92968e2f6f13 /test/functional/trackers_controller_test.rb | |
parent | eab8f307f9bad59e127a47f1191671da391de947 (diff) | |
download | redmine-8f43b5307799d39019117d52ff79b6499c952594.tar.gz redmine-8f43b5307799d39019117d52ff79b6499c952594.zip |
Rails4: replace deprecated Relation#first with finder options at TrackersControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12643 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/trackers_controller_test.rb')
-rw-r--r-- | test/functional/trackers_controller_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/trackers_controller_test.rb b/test/functional/trackers_controller_test.rb index 79e2e819e..442335259 100644 --- a/test/functional/trackers_controller_test.rb +++ b/test/functional/trackers_controller_test.rb @@ -54,7 +54,7 @@ class TrackersControllerTest < ActionController::TestCase post :create, :tracker => { :name => 'New tracker', :project_ids => ['1', '', ''], :custom_field_ids => ['1', '6', ''] } end assert_redirected_to :action => 'index' - tracker = Tracker.first(:order => 'id DESC') + tracker = Tracker.order('id DESC').first assert_equal 'New tracker', tracker.name assert_equal [1], tracker.project_ids.sort assert_equal Tracker::CORE_FIELDS, tracker.core_fields @@ -67,7 +67,7 @@ class TrackersControllerTest < ActionController::TestCase post :create, :tracker => { :name => 'New tracker', :core_fields => ['assigned_to_id', 'fixed_version_id', ''] } end assert_redirected_to :action => 'index' - tracker = Tracker.first(:order => 'id DESC') + tracker = Tracker.order('id DESC').first assert_equal 'New tracker', tracker.name assert_equal %w(assigned_to_id fixed_version_id), tracker.core_fields end |