diff options
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") + } } |
