Implemented the AFD Short Term / Long Term coverage

This commit is contained in:
2026-05-29 19:42:07 -05:00
parent 3e93a97d10
commit 42defcf4b9
9 changed files with 69 additions and 7 deletions

View File

@@ -43,6 +43,12 @@ func TestFetchBundleFromFixtures(t *testing.T) {
if bundle.Discussion == nil || len(bundle.Discussion.KeyMessages) != 2 {
t.Fatalf("Discussion = %#v, want key messages", bundle.Discussion)
}
if bundle.Discussion.ShortTerm == nil || bundle.Discussion.ShortTerm.Narrative != "A weak boundary may trigger isolated showers." {
t.Fatalf("Discussion.ShortTerm = %#v, want short-term AFD narrative", bundle.Discussion.ShortTerm)
}
if bundle.Discussion.LongTerm == nil || bundle.Discussion.LongTerm.Narrative != "Warmer temperatures and periodic rain chances continue into the weekend." {
t.Fatalf("Discussion.LongTerm = %#v, want long-term AFD narrative", bundle.Discussion.LongTerm)
}
if len(bundle.Sources) != 8 {
t.Fatalf("Sources length = %d, want 8", len(bundle.Sources))
}

View File

@@ -11,6 +11,10 @@
"shortTerm": {
"title": "Short Term",
"narrative": "A weak boundary may trigger isolated showers."
},
"longTerm": {
"title": "Long Term",
"narrative": "Warmer temperatures and periodic rain chances continue into the weekend."
}
}
}