Cover active alert text rendering
This commit is contained in:
@@ -337,6 +337,22 @@ func TestMetricCopyAndNilHandling(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestAlertsPayloadPassThrough(t *testing.T) {
|
||||
run := &model.WeatherAlertRun{
|
||||
LocationID: "stl",
|
||||
AsOf: time.Date(2026, 6, 11, 12, 0, 0, 0, time.UTC),
|
||||
Alerts: []model.WeatherAlert{{
|
||||
ID: "alert-1",
|
||||
Headline: "Storm warning",
|
||||
}},
|
||||
}
|
||||
|
||||
payload := AlertsPayload(run, UnitsUS)
|
||||
if payload != run {
|
||||
t.Fatalf("expected alerts payload to pass through input run")
|
||||
}
|
||||
}
|
||||
|
||||
func TestCurrentConditionsPayloadMetricAndUS(t *testing.T) {
|
||||
conditions := &app.CurrentConditions{
|
||||
TemperatureC: float64Ptr(20),
|
||||
|
||||
Reference in New Issue
Block a user