From db4f93af341acbf2aede59cad180498a0840669c Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Tue, 31 Mar 2026 20:53:46 -0400 Subject: [PATCH] test: fix HTML entity encoding assertion in metadata notes test The test was checking for hexadecimal entity ' but templ actually outputs the decimal entity ' for apostrophes. This commit updates the assertion to match the actual HTML output from the templ library. --- cmd/server/tests/comic_metadata_display_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/server/tests/comic_metadata_display_test.go b/cmd/server/tests/comic_metadata_display_test.go index 52a5fe2..73cbae0 100644 --- a/cmd/server/tests/comic_metadata_display_test.go +++ b/cmd/server/tests/comic_metadata_display_test.go @@ -423,8 +423,8 @@ func TestComicMetadataDisplay_ComicDetailPage(t *testing.T) { // Check that the metadata notes section is present assert.Contains(t, body, "Metadata Notes", "Should display metadata notes section header") - // The content is HTML-escaped by templ, so apostrophes become ' - assert.Contains(t, body, "John's Comics", "Should display HTML-escaped metadata notes content") + // The content is HTML-escaped by templ, so apostrophes become ' + assert.Contains(t, body, "John's Comics", "Should display HTML-escaped metadata notes content") // Also check for a simpler substring without special characters assert.Contains(t, body, "collection", "Should display metadata notes content") })