aboutsummaryrefslogtreecommitdiff
path: root/internal/liturgy/store_test.go
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-07-23 13:56:42 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-07-23 13:56:42 +0200
commite31b6120806240ece82426fe0a4d38c14113e464 (patch)
treec64d5558366ca925cdb1f8d4a8c340105ce5b4d3 /internal/liturgy/store_test.go
parente34d15605db9bb7fb11cdd342ac34faf4c8e4b90 (diff)
downloadlectio-e31b6120806240ece82426fe0a4d38c14113e464.tar.gz
lectio-e31b6120806240ece82426fe0a4d38c14113e464.zip
liturgy: LoadOffline sets PartID (fix offline gospel-only)
Diffstat (limited to 'internal/liturgy/store_test.go')
-rw-r--r--internal/liturgy/store_test.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/internal/liturgy/store_test.go b/internal/liturgy/store_test.go
index 979b091..08fd1a1 100644
--- a/internal/liturgy/store_test.go
+++ b/internal/liturgy/store_test.go
@@ -31,12 +31,19 @@ func TestHarvestAndOffline(t *testing.T) {
t.Fatal(err)
}
var haveGospel bool
+ var haveFirstCzytanie bool
for _, s := range secs {
- if s.Citation == "J 20, 1. 11-18" {
+ if s.Citation == "J 20, 1. 11-18" && s.PartID == "ewangelia" {
haveGospel = true
}
+ if strings.HasPrefix(s.Heading, "1. czytanie") && s.PartID == "pierwsze_czytanie" {
+ haveFirstCzytanie = true
+ }
}
if !haveGospel {
- t.Error("offline gospel citation missing")
+ t.Error("offline gospel citation or PartID missing")
+ }
+ if !haveFirstCzytanie {
+ t.Error("offline first czytanie PartID missing")
}
}