aboutsummaryrefslogtreecommitdiff
path: root/internal/web/server_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/web/server_test.go')
-rw-r--r--internal/web/server_test.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/internal/web/server_test.go b/internal/web/server_test.go
index 47c38e9..25d21f4 100644
--- a/internal/web/server_test.go
+++ b/internal/web/server_test.go
@@ -38,7 +38,10 @@ func TestServer(t *testing.T) {
t.Fatalf("status = %d, want 200", rec.Code)
}
body := rec.Body.String()
- if !strings.Contains(body, "Ewangelia") {
+ // config.Default() -> UILanguage "en", so the gospel heading's part
+ // label is localised to "Gospel" (render.LocalizeHeading); the
+ // citation stays exactly as scraped.
+ if !strings.Contains(body, "Gospel") {
t.Errorf("body missing reading heading: %q", body)
}
if !strings.Contains(body, "htmx") {
@@ -59,7 +62,8 @@ func TestServer(t *testing.T) {
if strings.Contains(body, "<html") {
t.Errorf("partial is not a fragment: %q", body)
}
- if !strings.Contains(body, "Ewangelia") {
+ // See "index page" above: config.Default() is English chrome.
+ if !strings.Contains(body, "Gospel") {
t.Errorf("partial missing reading heading: %q", body)
}
})
@@ -118,7 +122,8 @@ func TestServer(t *testing.T) {
if j := strings.Index(body[i+1:], `class="vnum"`); j != -1 {
block = body[i : i+1+j]
}
- if !strings.Contains(block, "Wujek") || !strings.Contains(block, "Wulgata") {
+ // config.Default() is English chrome: "Wujek (Polish)"/"Vulgate (Latin)".
+ if !strings.Contains(block, "Wujek") || !strings.Contains(block, "Vulgate") {
t.Errorf("interlinear verse block missing both version labels grouped together: %q", block)
}
})