2016-07-06 13:46:47 -04:00
|
|
|
require 'rails_helper'
|
|
|
|
require 'pretty_text'
|
|
|
|
|
|
|
|
describe PrettyText do
|
|
|
|
|
|
|
|
it "supports details tag" do
|
2016-07-20 02:10:42 -04:00
|
|
|
cooked_html = "<details><summary>foo</summary>\n\n<p>bar</p>\n\n</details>"
|
2016-07-06 13:46:47 -04:00
|
|
|
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
|