From: Toshi MARUYAMA Date: Wed, 8 Jan 2014 04:31:29 +0000 (+0000) Subject: Rails4: replace deprecated Relation#first with finder options at AccountControllerTest X-Git-Tag: 2.5.0~394 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=375eca924ced45ccfcff3b8d2523dac9534cd6fe;p=redmine.git Rails4: replace deprecated Relation#first with finder options at AccountControllerTest git-svn-id: http://svn.redmine.org/redmine/trunk@12505 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/test/functional/account_controller_test.rb b/test/functional/account_controller_test.rb index 0aae7b596..5423e065b 100644 --- a/test/functional/account_controller_test.rb +++ b/test/functional/account_controller_test.rb @@ -185,7 +185,7 @@ class AccountControllerTest < ActionController::TestCase } assert_redirected_to '/my/account' end - user = User.first(:order => 'id DESC') + user = User.order('id DESC').first assert_equal 'register', user.login assert_equal 'John', user.firstname assert_equal 'Doe', user.lastname