]> source.dussan.org Git - redmine.git/commitdiff
Rails4: replace deprecated Relation#first with finder options at GroupsControllerTest
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 8 Jan 2014 04:32:16 +0000 (04:32 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 8 Jan 2014 04:32:16 +0000 (04:32 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@12508 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/groups_controller_test.rb

index 67edb926166ac5250da1be09dfeb1af92f667121..0a21b544861c5564f9ec24475a83e750e53a28b7 100644 (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