Fix accidental extra minitest run in layout test

This commit is contained in:
Sami Samhuri 2026-02-07 18:55:20 -08:00
parent c65dee7e91
commit 7aff658eb2
No known key found for this signature in database

View file

@ -1,7 +1,7 @@
require "test_helper" require "test_helper"
class Pressa::Views::LayoutTest < Minitest::Test class Pressa::Views::LayoutTest < Minitest::Test
def test_content_view def content_view
Class.new(Phlex::HTML) do Class.new(Phlex::HTML) do
def view_template def view_template
article do article do
@ -25,7 +25,7 @@ class Pressa::Views::LayoutTest < Minitest::Test
html = Pressa::Views::Layout.new( html = Pressa::Views::Layout.new(
site:, site:,
canonical_url: "https://samhuri.net/posts/", canonical_url: "https://samhuri.net/posts/",
content: test_content_view content: content_view
).call ).call
assert_includes(html, "<article>") assert_includes(html, "<article>")
@ -39,7 +39,7 @@ class Pressa::Views::LayoutTest < Minitest::Test
site:, site:,
canonical_url: "https://samhuri.net/posts/", canonical_url: "https://samhuri.net/posts/",
page_subtitle: subtitle, page_subtitle: subtitle,
content: test_content_view content: content_view
).call ).call
assert_includes(html, "<title>samhuri.net: &lt;img src=x onerror=alert(1)&gt;</title>") assert_includes(html, "<title>samhuri.net: &lt;img src=x onerror=alert(1)&gt;</title>")
@ -58,7 +58,7 @@ class Pressa::Views::LayoutTest < Minitest::Test
html = Pressa::Views::Layout.new( html = Pressa::Views::Layout.new(
site: cdn_site, site: cdn_site,
canonical_url: "https://samhuri.net/posts/", canonical_url: "https://samhuri.net/posts/",
content: test_content_view content: content_view
).call ).call
assert_includes(html, %(<link rel="stylesheet" type="text/css" href="https://cdn.example.com/site.css">)) assert_includes(html, %(<link rel="stylesheet" type="text/css" href="https://cdn.example.com/site.css">))