From c9f3bf46f0de09edb796e35f3dcff349febf75c9 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Fri, 24 Jul 2026 10:32:28 +0200 Subject: dayinfo: show feast/day name + colour (modern niedziela + traditional missalemeum) in cli/tui/web; v0.5.0 --- internal/web/server_test.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'internal/web/server_test.go') diff --git a/internal/web/server_test.go b/internal/web/server_test.go index 00da039..809ee59 100644 --- a/internal/web/server_test.go +++ b/internal/web/server_test.go @@ -50,6 +50,11 @@ func TestServer(t *testing.T) { if !strings.Contains(body, `id="theme"`) { t.Errorf("body missing theme ") } + // Name is source-language (Polish), never translated, even + // though the surrounding chrome is English -- see RenderReadings. + if !strings.Contains(body, `class="dayinfo"`) || !strings.Contains(body, "Święto św. Marii Magdaleny") { + t.Errorf("body missing day-info header: %q", body) + } }) t.Run("readings partial", func(t *testing.T) { @@ -230,7 +235,7 @@ func TestServer(t *testing.T) { // TestRenderOrErrorNoSectionsLang checks the "no readings at all for this // day" fragment (finding §1) follows lang instead of always being Polish. func TestRenderOrErrorNoSectionsLang(t *testing.T) { - html := string(renderOrError(nil, nil, "new", "horizontal", "en", nil)) + html := string(renderOrError(nil, nil, "new", "horizontal", "en", liturgy.DayInfo{}, nil)) if !strings.Contains(html, "no readings for this day") { t.Errorf("en renderOrError(no secs) = %q, want it to contain %q", html, "no readings for this day") } @@ -238,7 +243,7 @@ func TestRenderOrErrorNoSectionsLang(t *testing.T) { t.Errorf("en renderOrError(no secs) should not carry Polish wording: %q", html) } - html = string(renderOrError(nil, nil, "new", "horizontal", "pl", nil)) + html = string(renderOrError(nil, nil, "new", "horizontal", "pl", liturgy.DayInfo{}, nil)) if !strings.Contains(html, "brak czytań na ten dzień") { t.Errorf("pl renderOrError(no secs) = %q, want it to contain %q", html, "brak czytań na ten dzień") } -- cgit v1.3