summaryrefslogtreecommitdiffstats
path: root/test/functional/messages_controller_test.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-11 07:47:18 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-11 07:47:18 +0000
commit65ba233c620ad18d3f8d1cbcc3e08b8af7eb9538 (patch)
tree17a201135b18e09830b72d6ba10ce9fc65441345 /test/functional/messages_controller_test.rb
parent7ac013fbe84e890b0cd9ed9c6adb129594f74a73 (diff)
downloadredmine-65ba233c620ad18d3f8d1cbcc3e08b8af7eb9538.tar.gz
redmine-65ba233c620ad18d3f8d1cbcc3e08b8af7eb9538.zip
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
Diffstat (limited to 'test/functional/messages_controller_test.rb')
-rw-r--r--test/functional/messages_controller_test.rb4
1 files 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