mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-04-26 14:47:44 +00:00
Fix accidental extra minitest run in layout test
This commit is contained in:
parent
c65dee7e91
commit
7aff658eb2
1 changed files with 4 additions and 4 deletions
|
|
@ -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: <img src=x onerror=alert(1)></title>")
|
assert_includes(html, "<title>samhuri.net: <img src=x onerror=alert(1)></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">))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue