diff options
-rw-r--r-- | test/functional/comments_controller_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/functional/comments_controller_test.rb b/test/functional/comments_controller_test.rb index e3e99d364..76e41d995 100644 --- a/test/functional/comments_controller_test.rb +++ b/test/functional/comments_controller_test.rb @@ -29,7 +29,7 @@ class CommentsControllerTest < ActionController::TestCase post :create, :id => 1, :comment => { :comments => 'This is a test comment' } assert_redirected_to '/news/1' - comment = News.find(1).comments.find(:first, :order => 'created_on DESC') + comment = News.find(1).comments.last assert_not_nil comment assert_equal 'This is a test comment', comment.comments assert_equal User.find(2), comment.author |