From d9d758aeeb59fe65bd8ef98f4c38cb4032ee2c03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Wed, 6 Jul 2016 19:46:47 +0200 Subject: [PATCH] add pretty-text tests for discourse-details plugin --- .../spec/components/pretty_text_spec.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 plugins/discourse-details/spec/components/pretty_text_spec.rb diff --git a/plugins/discourse-details/spec/components/pretty_text_spec.rb b/plugins/discourse-details/spec/components/pretty_text_spec.rb new file mode 100644 index 0000000000..b9b91ea771 --- /dev/null +++ b/plugins/discourse-details/spec/components/pretty_text_spec.rb @@ -0,0 +1,12 @@ +require 'rails_helper' +require 'pretty_text' + +describe PrettyText do + + it "supports details tag" do + cooked_html = "
foo\n\n

bar

\n\n

" + expect(PrettyText.cook("
foobar
")).to match_html(cooked_html) + expect(PrettyText.cook("[details=foo]bar[/details]")).to match_html(cooked_html) + end + +end