##// 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 post :create, :project_id => 1, :board => { :name => 'Testing', :description => 'Testing board creation'}
139 post :create, :project_id => 1, :board => { :name => 'Testing', :description => 'Testing board creation'}
140 end
140 end
141 assert_redirected_to '/projects/ecookbook/settings/boards'
141 assert_redirected_to '/projects/ecookbook/settings/boards'
142 board = Board.first(:order => 'id DESC')
142 board = Board.order('id DESC').first
143 assert_equal 'Testing', board.name
143 assert_equal 'Testing', board.name
144 assert_equal 'Testing board creation', board.description
144 assert_equal 'Testing board creation', board.description
145 end
145 end
@@ -150,7 +150,7 class BoardsControllerTest < ActionController::TestCase
150 post :create, :project_id => 1, :board => { :name => 'Testing', :description => 'Testing', :parent_id => 2}
150 post :create, :project_id => 1, :board => { :name => 'Testing', :description => 'Testing', :parent_id => 2}
151 end
151 end
152 assert_redirected_to '/projects/ecookbook/settings/boards'
152 assert_redirected_to '/projects/ecookbook/settings/boards'
153 board = Board.first(:order => 'id DESC')
153 board = Board.order('id DESC').first
154 assert_equal Board.find(2), board.parent
154 assert_equal Board.find(2), board.parent
155 end
155 end
156
156
General Comments 0
You need to be logged in to leave comments. Login now