add pretty-text tests for discourse-details plugin

This commit is contained in:
Régis Hanol 2016-07-06 19:46:47 +02:00 committed by Robin Ward
parent a2b9b01d0f
commit d9d758aeeb

View File

@ -0,0 +1,12 @@
require 'rails_helper'
require 'pretty_text'
describe PrettyText do
it "supports details tag" do
cooked_html = "<details><summary>foo</summary>\n\n<p>bar</p>\n\n<p></p></details>"
expect(PrettyText.cook("<details><summary>foo</summary>bar</details>")).to match_html(cooked_html)
expect(PrettyText.cook("[details=foo]bar[/details]")).to match_html(cooked_html)
end
end