0
@@ -10,7 +10,7 @@ class CommentTest < Test::Unit::TestCase
0
def test_should_add_comment_and_retrieve_attributes_from_article
0
assert_difference Comment, :count do
0
- comment = contents(:welcome).comments.create :body => 'test comment', :author => 'bob', :author_ip => '127.0.0.1'
, :filter => 'textile_filter'0
+ comment = contents(:welcome).comments.create :body => 'test comment', :author => 'bob', :author_ip => '127.0.0.1'
0
assert_equal contents(:welcome).site_id, comment.site_id
0
assert_equal contents(:welcome).title, comment.title
0
assert_equal contents(:welcome).published_at, comment.published_at
0
@@ -28,7 +28,7 @@ class CommentTest < Test::Unit::TestCase
0
def test_should_allow_set_filter_on_comment
0
old_times = contents(:welcome).comments.collect &:updated_at
0
- comment = contents(:welcome).comments.create :body => 'test comment', :author => 'bob', :author_ip => '127.0.0.1'
, :filter => 'markdown_filter'0
+ comment = contents(:welcome).comments.create :body => 'test comment', :author => 'bob', :author_ip => '127.0.0.1'
0
comment.filter = 'markdown_filter'
0
assert_equal old_times, contents(:welcome).comments(true).collect(&:updated_at)
0
@@ -77,7 +77,7 @@ class CommentTest < Test::Unit::TestCase
0
def test_should_clean_up_email_and_url
0
comments = contents(:welcome).comments
0
- options = {:body => 'test', :author => 'bob', :author_ip => '127.0.0.1'
, :filter => 'textile_filter'}
0
+ options = {:body => 'test', :author => 'bob', :author_ip => '127.0.0.1'
}
0
comment = comments.build options.merge(:author_email => ' bob@example.com ')
0
assert_equal 'bob@example.com', comment.author_email
0
@@ -97,7 +97,7 @@ class CommentTest < Test::Unit::TestCase
0
def test_should_validate_emails
0
comments = contents(:welcome).comments
0
- options = {:body => 'test', :author => 'bob', :author_ip => '127.0.0.1'
, :filter => 'textile_filter'}
0
+ options = {:body => 'test', :author => 'bob', :author_ip => '127.0.0.1'
}
0
comment = comments.build options.merge(:author_email => 'bob@example.com')
0
comment = comments.build options.merge(:author_email => 'bobexample.com')
Comments
No one has commented yet.