fix broken spec
This commit is contained in:
parent
93e5112dfa
commit
660d5e0a35
|
@ -4,9 +4,17 @@ require 'pretty_text'
|
||||||
describe PrettyText do
|
describe PrettyText do
|
||||||
|
|
||||||
it "supports details tag" do
|
it "supports details tag" do
|
||||||
cooked_html = "<details><summary>foo</summary>\n\n<p>bar</p>\n\n</details>"
|
cooked_html = "<details><summary>foo</summary>bar</details>"
|
||||||
expect(PrettyText.cook("<details><summary>foo</summary>bar</details>")).to match_html(cooked_html)
|
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)
|
|
||||||
|
cooked_html = <<~HTML
|
||||||
|
<details>
|
||||||
|
<summary>
|
||||||
|
foo</summary>
|
||||||
|
<p>bar</p>
|
||||||
|
</details>
|
||||||
|
HTML
|
||||||
|
expect(PrettyText.cook("[details=foo]\nbar\n[/details]")).to eq(cooked_html.strip)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue