test/devcenter-parser_test.rb in devcenter-parser-1.3.4 vs test/devcenter-parser_test.rb in devcenter-parser-1.3.5

- old
+ new

@@ -3,17 +3,29 @@ require_relative '../lib/devcenter-parser' describe 'DevcenterParser' do describe '.to_unsanitized_html' do + + it 'returns empty string for nil input' do + assert_parsing_unsanitized_result nil, :maruku, '' + assert_parsing_unsanitized_result nil, :maruku, '' + end + it 'maintains script tags' do md = '<script>alert("hi")</script>' assert_parsing_unsanitized_result md, :maruku, md assert_parsing_unsanitized_result md, :github, '<script>alert("hi")</script>' end + end describe '.to_html' do + + it 'returns empty string for nil input' do + assert_maruku_result nil, '' + assert_github_result nil, '' + end it 'raises InvalidMarkdownError when parsing invalid markdown' do md = '[foo](bar' assert_raises DevcenterParser::InvalidMarkdownError do DevcenterParser.to_html(md, :maruku) \ No newline at end of file