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
This commit is contained in:
Toshi MARUYAMA 2014-01-08 04:32:16 +00:00
parent 848edf35fa
commit 7d4420fe19
1 changed files with 2 additions and 2 deletions

View File

@ -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