diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-24 10:32:28 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-24 10:32:28 +0200 |
| commit | c9f3bf46f0de09edb796e35f3dcff349febf75c9 (patch) | |
| tree | c1a0b98b484e4da557c1ab205dfff0d92ce8ac36 /internal/readings/readings_test.go | |
| parent | a865374755480a4aef2a6156afccdf08a91422ea (diff) | |
| download | lectio-c9f3bf46f0de09edb796e35f3dcff349febf75c9.tar.gz lectio-c9f3bf46f0de09edb796e35f3dcff349febf75c9.zip | |
dayinfo: show feast/day name + colour (modern niedziela + traditional missalemeum) in cli/tui/web; v0.5.0
Diffstat (limited to 'internal/readings/readings_test.go')
| -rw-r--r-- | internal/readings/readings_test.go | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/internal/readings/readings_test.go b/internal/readings/readings_test.go index 9a31802..c9e92cd 100644 --- a/internal/readings/readings_test.go +++ b/internal/readings/readings_test.go @@ -92,7 +92,7 @@ func TestLoadModernRoutes(t *testing.T) { t.Setenv("XDG_CACHE_HOME", t.TempDir()) cfg := config.Config{Lectionary: "new"} - secs, err := Load(cfg, Options{Date: "2026-07-22", All: true}) + secs, info, err := Load(cfg, Options{Date: "2026-07-22", All: true}) if err != nil { t.Fatalf("Load: %v", err) } @@ -106,6 +106,9 @@ func TestLoadModernRoutes(t *testing.T) { if !found { t.Errorf("no gospel section (PartID=ewangelia) found in %+v", secs) } + if !strings.Contains(info.Name, "Marii Magdaleny") { + t.Errorf("DayInfo.Name = %q, want it to contain %q", info.Name, "Marii Magdaleny") + } } // TestLoadTraditionalOfflineErrorsWithoutCache exercises the (formerly @@ -116,7 +119,7 @@ func TestLoadTraditionalOfflineErrorsWithoutCache(t *testing.T) { t.Setenv("XDG_CACHE_HOME", t.TempDir()) cfg := config.Config{Lectionary: "traditional", TraditionalLang: "pl"} - _, err := Load(cfg, Options{Date: "2026-07-22", Offline: true}) + _, _, err := Load(cfg, Options{Date: "2026-07-22", Offline: true}) if err == nil { t.Fatal("expected error, got nil") } @@ -146,11 +149,14 @@ func TestLoadTraditionalOfflineReadsCache(t *testing.T) { } cfg := config.Config{Lectionary: "traditional", TraditionalLang: "pl"} - secs, err := Load(cfg, Options{Date: "2026-07-22", Offline: true, All: true}) + secs, info, err := Load(cfg, Options{Date: "2026-07-22", Offline: true, All: true}) if err != nil { t.Fatalf("Load: %v", err) } if len(secs) == 0 { t.Error("expected traditional offline sections, got none") } + if info.Name != "St. Mary Magdalene" { + t.Errorf("DayInfo.Name = %q, want %q", info.Name, "St. Mary Magdalene") + } } |
