##// END OF EJS Templates
Rails4: replace deprecated Relation#first with finder options at BoardsControllerTest...
Toshi MARUYAMA -
r12231:6204bcb34ef4
parent child
Show More
@@ -139,7 +139,7 class BoardsControllerTest < ActionController::TestCase
139 139 post :create, :project_id => 1, :board => { :name => 'Testing', :description => 'Testing board creation'}
140 140 end
141 141 assert_redirected_to '/projects/ecookbook/settings/boards'
142 board = Board.first(:order => 'id DESC')
142 board = Board.order('id DESC').first
143 143 assert_equal 'Testing', board.name
144 144 assert_equal 'Testing board creation', board.description
145 145 end
@@ -150,7 +150,7 class BoardsControllerTest < ActionController::TestCase
150 150 post :create, :project_id => 1, :board => { :name => 'Testing', :description => 'Testing', :parent_id => 2}
151 151 end
152 152 assert_redirected_to '/projects/ecookbook/settings/boards'
153 board = Board.first(:order => 'id DESC')
153 board = Board.order('id DESC').first
154 154 assert_equal Board.find(2), board.parent
155 155 end
156 156
General Comments 0
You need to be logged in to leave comments. Login now