diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-11 09:24:56 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-11 09:24:56 +0000 |
commit | 45496b0eb2b57b3064ff0c7603f3cad27c78c8a5 (patch) | |
tree | 91bdd42a8a748ba0ac3042e6e4d53083f6732bb2 /test/functional/users_controller_test.rb | |
parent | 378a3e684faec7471fa92ae1cebf624ffaf91121 (diff) | |
download | redmine-45496b0eb2b57b3064ff0c7603f3cad27c78c8a5.tar.gz redmine-45496b0eb2b57b3064ff0c7603f3cad27c78c8a5.zip |
Rails4: replace deprecated Relation#first with finder options at UsersControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12636 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/users_controller_test.rb')
-rw-r--r-- | test/functional/users_controller_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb index c150fd0f2..f882275c4 100644 --- a/test/functional/users_controller_test.rb +++ b/test/functional/users_controller_test.rb @@ -169,7 +169,7 @@ class UsersControllerTest < ActionController::TestCase end end - user = User.first(:order => 'id DESC') + user = User.order('id DESC').first assert_redirected_to :controller => 'users', :action => 'edit', :id => user.id assert_equal 'John', user.firstname @@ -204,7 +204,7 @@ class UsersControllerTest < ActionController::TestCase 'warn_on_leaving_unsaved' => '0' } end - user = User.first(:order => 'id DESC') + user = User.order('id DESC').first assert_equal 'jdoe', user.login assert_equal true, user.pref.hide_mail assert_equal 'Paris', user.pref.time_zone @@ -430,7 +430,7 @@ class UsersControllerTest < ActionController::TestCase post :edit_membership, :id => 7, :membership => { :project_id => 3, :role_ids => [2]} end assert_redirected_to :action => 'edit', :id => '7', :tab => 'memberships' - member = Member.first(:order => 'id DESC') + member = Member.order('id DESC').first assert_equal User.find(7), member.principal assert_equal [2], member.role_ids assert_equal 3, member.project_id @@ -443,7 +443,7 @@ class UsersControllerTest < ActionController::TestCase assert_template 'edit_membership' assert_equal 'text/javascript', response.content_type end - member = Member.first(:order => 'id DESC') + member = Member.order('id DESC').first assert_equal User.find(7), member.principal assert_equal [2], member.role_ids assert_equal 3, member.project_id |