Removed the integer condition code from the output at the conditions/current endpoint
All checks were successful
ci/woodpecker/push/build-image Pipeline was successful
All checks were successful
ci/woodpecker/push/build-image Pipeline was successful
This commit is contained in:
@@ -140,15 +140,15 @@ func TestConditionsCurrentDefaultsToUSUnits(t *testing.T) {
|
||||
if got := payload["windDirectionDegrees"].(float64); got != 270.0 {
|
||||
t.Fatalf("expected windDirectionDegrees=270.0, got %v", got)
|
||||
}
|
||||
if got := payload["conditionCode"].(float64); got != 63 {
|
||||
t.Fatalf("expected conditionCode=63, got %v", got)
|
||||
}
|
||||
if got := payload["conditionText"].(string); got != "Rain" {
|
||||
t.Fatalf("expected conditionText=Rain, got %v", got)
|
||||
}
|
||||
if got := payload["isDay"].(bool); !got {
|
||||
t.Fatalf("expected isDay=true, got %v", got)
|
||||
}
|
||||
if _, exists := payload["conditionCode"]; exists {
|
||||
t.Fatalf("did not expect conditionCode in conditions response")
|
||||
}
|
||||
if _, exists := payload["temperatureC"]; exists {
|
||||
t.Fatalf("did not expect metric key temperatureC in default US response")
|
||||
}
|
||||
@@ -189,15 +189,15 @@ func TestConditionsCurrentSupportsMetricUnits(t *testing.T) {
|
||||
if got := payload["windSpeedKmh"].(float64); got != 10.0 {
|
||||
t.Fatalf("expected windSpeedKmh=10.0, got %v", got)
|
||||
}
|
||||
if got := payload["conditionCode"].(float64); got != 63 {
|
||||
t.Fatalf("expected conditionCode=63, got %v", got)
|
||||
}
|
||||
if got := payload["conditionText"].(string); got != "Rain" {
|
||||
t.Fatalf("expected conditionText=Rain, got %v", got)
|
||||
}
|
||||
if got := payload["isDay"].(bool); got {
|
||||
t.Fatalf("expected isDay=false, got %v", got)
|
||||
}
|
||||
if _, exists := payload["conditionCode"]; exists {
|
||||
t.Fatalf("did not expect conditionCode in conditions response")
|
||||
}
|
||||
if _, exists := payload["temperatureF"]; exists {
|
||||
t.Fatalf("did not expect US key temperatureF in metric response")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user