From 375eca924ced45ccfcff3b8d2523dac9534cd6fe 2014-01-08 04:31:29 From: Toshi MARUYAMA Date: 2014-01-08 04:31:29 Subject: [PATCH] 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 0aae7b5..5423e06 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