##// END OF EJS Templates
Rails4: replace deprecated Relation#first with finder options at GroupsControllerTest...
Toshi MARUYAMA -
r12233:7d4420fe19b2
parent child
Show More
@@ -53,7 +53,7 class GroupsControllerTest < ActionController::TestCase
53 53 post :create, :group => {:name => 'New group'}
54 54 end
55 55 assert_redirected_to '/groups'
56 group = Group.first(:order => 'id DESC')
56 group = Group.order('id DESC').first
57 57 assert_equal 'New group', group.name
58 58 assert_equal [], group.users
59 59 end
@@ -63,7 +63,7 class GroupsControllerTest < ActionController::TestCase
63 63 post :create, :group => {:name => 'New group'}, :continue => 'Create and continue'
64 64 end
65 65 assert_redirected_to '/groups/new'
66 group = Group.first(:order => 'id DESC')
66 group = Group.order('id DESC').first
67 67 assert_equal 'New group', group.name
68 68 end
69 69
General Comments 0
You need to be logged in to leave comments. Login now