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:
parent
848edf35fa
commit
7d4420fe19
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue