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

test/functional/boards_controller_test.rb

index 6b07b900ce6c2ac6ca0bd2cc424ca83d54c90755..a8154faa389386887caf68d966219cac85368222 100644 (file)
@@ -139,7 +139,7 @@ class BoardsControllerTest < ActionController::TestCase
       post :create, :project_id => 1, :board => { :name => 'Testing', :description => 'Testing board creation'}
     end
     assert_redirected_to '/projects/ecookbook/settings/boards'
-    board = Board.first(:order => 'id DESC')
+    board = Board.order('id DESC').first
     assert_equal 'Testing', board.name
     assert_equal 'Testing board creation', board.description
   end
@@ -150,7 +150,7 @@ class BoardsControllerTest < ActionController::TestCase
       post :create, :project_id => 1, :board => { :name => 'Testing', :description => 'Testing', :parent_id => 2}
     end
     assert_redirected_to '/projects/ecookbook/settings/boards'
-    board = Board.first(:order => 'id DESC')
+    board = Board.order('id DESC').first
     assert_equal Board.find(2), board.parent
   end