diff options
Diffstat (limited to 'internal/web/server_test.go')
| -rw-r--r-- | internal/web/server_test.go | 9 |
1 files changed, 7 insertions, 2 deletions
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 <link>") } + // 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ń") } |
