@@ -29,7 +29,7 class CommentsControllerTest < ActionController::TestCase | |||||
29 | post :create, :id => 1, :comment => { :comments => 'This is a test comment' } |
|
29 | post :create, :id => 1, :comment => { :comments => 'This is a test comment' } | |
30 | assert_redirected_to '/news/1' |
|
30 | assert_redirected_to '/news/1' | |
31 |
|
31 | |||
32 |
comment = News.find(1).comments. |
|
32 | comment = News.find(1).comments.last | |
33 | assert_not_nil comment |
|
33 | assert_not_nil comment | |
34 | assert_equal 'This is a test comment', comment.comments |
|
34 | assert_equal 'This is a test comment', comment.comments | |
35 | assert_equal User.find(2), comment.author |
|
35 | assert_equal User.find(2), comment.author |
General Comments 0
You need to be logged in to leave comments.
Login now