mirror of
https://github.com/redmine/redmine.git
synced 2025-11-01 19:05:51 +01:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user