aboutsummaryrefslogtreecommitdiff
path: root/internal/web/render_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/web/render_test.go')
-rw-r--r--internal/web/render_test.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/internal/web/render_test.go b/internal/web/render_test.go
index ea44ed2..494cdcd 100644
--- a/internal/web/render_test.go
+++ b/internal/web/render_test.go
@@ -106,6 +106,22 @@ func TestRenderReadingsInterlinearNoVersifiedNote(t *testing.T) {
if strings.Contains(html, "ilverse") {
t.Errorf("expected no ilverse blocks when nothing resolves: %q", html)
}
+ if !strings.Contains(html, "brak wersetów do zestawienia interlinearnego") {
+ t.Errorf("pl no-verses note missing/wrong: %q", html)
+ }
+}
+
+// TestRenderReadingsInterlinearNoVersifiedNoteLang checks the interlinear
+// "no verses to align" note (finding §1) follows lang, not always Polish.
+func TestRenderReadingsInterlinearNoVersifiedNoteLang(t *testing.T) {
+ secs := []liturgy.Section{{Heading: "Bez odwołania", PartID: "ewangelia"}}
+ html := string(RenderReadings(secs, []string{"wuj"}, "new", "interlinear", "en"))
+ if !strings.Contains(html, "(no verses to align)") {
+ t.Errorf("en no-verses note missing/wrong: %q", html)
+ }
+ if strings.Contains(html, "brak wersetów") {
+ t.Errorf("en output should not carry the Polish no-verses note: %q", html)
+ }
}
// TestRenderReadingsLocalizesEN checks that lang="en" localises both the