diff --git a/plugins/discourse-details/spec/components/pretty_text_spec.rb b/plugins/discourse-details/spec/components/pretty_text_spec.rb
index 5c2ad81e100..cd03a2fb6ba 100644
--- a/plugins/discourse-details/spec/components/pretty_text_spec.rb
+++ b/plugins/discourse-details/spec/components/pretty_text_spec.rb
@@ -4,9 +4,17 @@ require 'pretty_text'
describe PrettyText do
it "supports details tag" do
- cooked_html = "foo
\n\nbar
\n\n "
+ cooked_html = "foo
bar "
expect(PrettyText.cook("foo
bar ")).to match_html(cooked_html)
- expect(PrettyText.cook("[details=foo]bar[/details]")).to match_html(cooked_html)
+
+ cooked_html = <<~HTML
+
+
+ foo
+ bar
+
+ HTML
+ expect(PrettyText.cook("[details=foo]\nbar\n[/details]")).to eq(cooked_html.strip)
end
end