test/functional/comments_controller_test.rb in zena-1.0.0.rc2 vs test/functional/comments_controller_test.rb in zena-1.0.0.rc3
- old
+ new
@@ -10,9 +10,18 @@
assert_redirected_to zen_path(nodes(:status))
comment = assigns['comment']
assert !comment.new_record?
end
+ def test_create_bad_captcha
+ login(:anon)
+ post 'create', 'node_id'=>nodes_zip(:status), 'comment'=>{'title'=>'blowe', 'text' => 'I do not know..'}
+ assert_response :redirect
+ assert_redirected_to zen_path(nodes(:status))
+ comment = assigns['comment']
+ assert comment.new_record?
+ end
+
def test_update
login(:tiger)
put 'update', 'id'=>comments_id(:tiger_says_inside), 'comment'=>{'title'=>'hahaha', 'text' => 'new text'}
assert_response :redirect
assert_redirected_to zen_path(nodes(:status))
\ No newline at end of file