summaryrefslogtreecommitdiffstats
path: root/test/functional/comments_controller_test.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-02-25 01:43:11 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-02-25 01:43:11 +0000
commitb7ead65fde0fb813f4787e448d8c76670539a95e (patch)
tree6ab8884a558173219e702a1df508942dd3936cb7 /test/functional/comments_controller_test.rb
parentf04c7a76800e47815286547981c8de09b11a79c9 (diff)
downloadredmine-b7ead65fde0fb813f4787e448d8c76670539a95e.tar.gz
redmine-b7ead65fde0fb813f4787e448d8c76670539a95e.zip
Rails3: test: fix ordering functional/comments_controller_test.rb
On Rails 3.0.11, test fails. <pre> Failure: <"This is a test comment"> expected but was <"my first comment">. test_add_comment(CommentsControllerTest) test/functional/comments_controller_test.rb:34:in `test_add_comment' </pre> Contributed by Sylvain Utard. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8987 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/comments_controller_test.rb')
-rw-r--r--test/functional/comments_controller_test.rb2
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