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.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/web/render_test.go b/internal/web/render_test.go
index 494cdcd..b7f5b1e 100644
--- a/internal/web/render_test.go
+++ b/internal/web/render_test.go
@@ -45,7 +45,7 @@ func TestRenderReadingsEscapesScriptText(t *testing.T) {
PartID: "pierwsze_czytanie",
Paragraphs: [][]string{{"<script>alert(1)</script>"}},
}}
- html := string(RenderReadings(secs, []string{"pl"}, "new", "horizontal", "pl"))
+ html := string(RenderReadings(secs, []string{"bt"}, "new", "horizontal", "pl"))
if strings.Contains(html, "<script>alert(1)</script>") {
t.Errorf("raw <script> leaked into rendered output: %q", html)
}
@@ -89,14 +89,14 @@ func TestRenderReadingsInterlinear(t *testing.T) {
}
}
-func TestRenderReadingsInterlinearExcludesPL(t *testing.T) {
+func TestRenderReadingsInterlinearExcludesBT(t *testing.T) {
secs := []liturgy.Section{{Heading: "Ewangelia (J 20, 1. 11-18)", PartID: "ewangelia"}}
- html := string(RenderReadings(secs, []string{"pl", "vul"}, "new", "interlinear", "pl"))
- if strings.Contains(html, "Polski (niedziela.pl)") {
- t.Errorf("interlinear output should substitute wuj for pl, not carry pl's label: %q", html[:min(300, len(html))])
+ html := string(RenderReadings(secs, []string{"bt", "vul"}, "new", "interlinear", "pl"))
+ if strings.Contains(html, "Biblia TysiÄ…clecia (niedziela.pl)") {
+ t.Errorf("interlinear output should substitute wuj for bt, not carry bt's label: %q", html[:min(300, len(html))])
}
if !strings.Contains(html, "Wujek") {
- t.Errorf("interlinear output should substitute wuj for pl: %q", html[:min(300, len(html))])
+ t.Errorf("interlinear output should substitute wuj for bt: %q", html[:min(300, len(html))])
}
}