From 7d4420fe19b2e06b85fd78328d0e522eca4f3f1a Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 8 Jan 2014 04:32:16 +0000 Subject: [PATCH] Rails4: replace deprecated Relation#first with finder options at GroupsControllerTest git-svn-id: http://svn.redmine.org/redmine/trunk@12508 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/groups_controller_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/functional/groups_controller_test.rb b/test/functional/groups_controller_test.rb index 67edb9261..0a21b5448 100644 --- a/test/functional/groups_controller_test.rb +++ b/test/functional/groups_controller_test.rb @@ -53,7 +53,7 @@ class GroupsControllerTest < ActionController::TestCase post :create, :group => {:name => 'New group'} end assert_redirected_to '/groups' - group = Group.first(:order => 'id DESC') + group = Group.order('id DESC').first assert_equal 'New group', group.name assert_equal [], group.users end @@ -63,7 +63,7 @@ class GroupsControllerTest < ActionController::TestCase post :create, :group => {:name => 'New group'}, :continue => 'Create and continue' end assert_redirected_to '/groups/new' - group = Group.first(:order => 'id DESC') + group = Group.order('id DESC').first assert_equal 'New group', group.name end