Permalink
Browse files

Added failing test for Josh Nesbitt's fix

  • Loading branch information...
karmi committed Sep 13, 2009
1 parent 8b5ce9b commit 6e25204952a989722804ca928006bbd04209a920
Showing with 7 additions and 0 deletions.
  1. +7 −0 app/test/marley_test.rb
View
@@ -73,6 +73,13 @@ def test_should_create_comment
assert Marley::Comment.count == comment_count + 1
end
+ def test_should_not_create_commit_when_author_field_is_missing
+ comment_count = Marley::Comment.count
+ post '/test-article-one/comments', default_comment_attributes.merge( :author => nil )
+ assert_equal 200, @response.status
+ assert Marley::Comment.count == comment_count
+ end
+
def test_should_fix_url_on_comment_create
post '/test-article-one/comments', default_comment_attributes.merge(:url => 'www.example.com')
assert_equal 'http://www.example.com', Marley::Comment.last.url

0 comments on commit 6e25204

Please sign in to comment.