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
This commit is contained in:
Toshi MARUYAMA 2014-01-11 07:47:18 +00:00
parent 7ac013fbe8
commit 65ba233c62
1 changed files with 2 additions and 2 deletions

View File

@ -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