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:
parent
7ac013fbe8
commit
65ba233c62
|
@ -54,13 +54,13 @@ class MessagesControllerTest < ActionController::TestCase
|
||||||
:board_id => 1)
|
:board_id => 1)
|
||||||
end
|
end
|
||||||
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_response :success
|
||||||
assert_template 'show'
|
assert_template 'show'
|
||||||
replies = assigns(:replies)
|
replies = assigns(:replies)
|
||||||
assert_not_nil replies
|
assert_not_nil replies
|
||||||
assert !replies.include?(message.children.first(:order => 'id'))
|
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
|
end
|
||||||
|
|
||||||
def test_show_with_reply_permission
|
def test_show_with_reply_permission
|
||||||
|
|
Loading…
Reference in New Issue