Split current conditions condition code querying
This commit is contained in:
@@ -279,7 +279,7 @@ func TestMapAlertRowNullableEnds(t *testing.T) {
|
||||
func TestMapCurrentConditionsRowNoSamplesReturnsNil(t *testing.T) {
|
||||
got := mapCurrentConditionsRow(currentConditionsRow{
|
||||
SampleCount: 0,
|
||||
})
|
||||
}, model.WMOUnknown)
|
||||
if got != nil {
|
||||
t.Fatalf("expected nil for empty sample window, got %+v", got)
|
||||
}
|
||||
@@ -295,9 +295,8 @@ func TestMapCurrentConditionsRowMapsFields(t *testing.T) {
|
||||
RelativeHumidityPercent: sql.NullFloat64{Float64: 72, Valid: true},
|
||||
WindSpeedKmh: sql.NullFloat64{Float64: 24.8, Valid: true},
|
||||
WindDirectionDegrees: sql.NullFloat64{Float64: 182.5, Valid: true},
|
||||
ConditionCode: sql.NullInt64{Int64: 65, Valid: true},
|
||||
IsDay: sql.NullBool{Bool: isDay, Valid: true},
|
||||
})
|
||||
}, 65)
|
||||
if got == nil {
|
||||
t.Fatalf("expected mapped current conditions")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user