From 65ba233c620ad18d3f8d1cbcc3e08b8af7eb9538 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sat, 11 Jan 2014 07:47:18 +0000 Subject: [PATCH] Rails4: replace deprecated Relation#last with finder options at MessagesControllerTest git-svn-id: http://svn.redmine.org/redmine/trunk@12626 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/messages_controller_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/functional/messages_controller_test.rb b/test/functional/messages_controller_test.rb index d6e7da9a8..a8000ca1b 100644 --- a/test/functional/messages_controller_test.rb +++ b/test/functional/messages_controller_test.rb @@ -54,13 +54,13 @@ class MessagesControllerTest < ActionController::TestCase :board_id => 1) end end - get :show, :board_id => 1, :id => 1, :r => message.children.last(:order => 'id').id + get :show, :board_id => 1, :id => 1, :r => message.children.order('id').last.id assert_response :success assert_template 'show' replies = assigns(:replies) assert_not_nil replies assert !replies.include?(message.children.first(:order => 'id')) - assert replies.include?(message.children.last(:order => 'id')) + assert replies.include?(message.children.order('id').last) end def test_show_with_reply_permission