]> source.dussan.org Git - redmine.git/commitdiff
Rails4: replace deprecated Relation#last with finder options at MessagesControllerTest
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 11 Jan 2014 07:47:18 +0000 (07:47 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 11 Jan 2014 07:47:18 +0000 (07:47 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@12626 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/messages_controller_test.rb

index d6e7da9a8f37c9c1896182a0f9888d72e5b29171..a8000ca1bdd1666b5ff61057ae41b4cc87133501 100644 (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