diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-23 20:46:17 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-23 20:46:17 +0200 |
| commit | 0b47572bc0addc5f59ebac3e70278ea435097565 (patch) | |
| tree | a04a3a3afb2c074b2f714f396506dc5bb4f5cbca /internal/readings/readings_test.go | |
| parent | 734eb4f3aec4e3c10064c7af4bd8e33c64ad07a7 (diff) | |
| download | lectio-0b47572bc0addc5f59ebac3e70278ea435097565.tar.gz lectio-0b47572bc0addc5f59ebac3e70278ea435097565.zip | |
web: theme control boxes, one default version, drop search bar; traditional drops pl + all=readings-only
Diffstat (limited to 'internal/readings/readings_test.go')
| -rw-r--r-- | internal/readings/readings_test.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/internal/readings/readings_test.go b/internal/readings/readings_test.go index fd355ff..20df5e0 100644 --- a/internal/readings/readings_test.go +++ b/internal/readings/readings_test.go @@ -55,6 +55,29 @@ func TestFilterPartsAll(t *testing.T) { } } +func TestFilterPartsTraditionalAllReadingsOnly(t *testing.T) { + secs := []liturgy.Section{ + {PartID: "introitus", Heading: "Introit"}, + {PartID: "oratio", Heading: "Kolekta"}, + {PartID: "lectio", Heading: "Lekcja"}, + {PartID: "graduale", Heading: "GraduaĆ"}, + {PartID: "evangelium", Heading: "Ewangelia"}, + {PartID: "offertorium", Heading: "Ofiarowanie"}, + {PartID: "secreta", Heading: "Sekreta"}, + {PartID: "communio", Heading: "Komunia"}, + {PartID: "postcommunio", Heading: "Pokomunia"}, + } + cfg := config.Config{Lectionary: "traditional"} + got := filterParts(secs, cfg, true) + + if len(got) != 2 { + t.Fatalf("got %d sections, want 2: %+v", len(got), got) + } + if got[0].PartID != "lectio" || got[1].PartID != "evangelium" { + t.Errorf("got %+v, want [lectio evangelium] in order", got) + } +} + func TestLoadModernRoutes(t *testing.T) { html, err := os.ReadFile("../liturgy/testdata/2026-07-22.html") if err != nil { |
