Bound generated text content and diagnostics
This commit is contained in:
@@ -62,7 +62,7 @@ func TestValidateTodayRejectsInvalidInput(t *testing.T) {
|
||||
{
|
||||
name: "unknown field",
|
||||
in: `{"summary":"Showers are likely today.","forecast_discussion":["A front will keep rain chances elevated."],"extra":"value"}`,
|
||||
want: `unknown field "extra"`,
|
||||
want: "unsupported field",
|
||||
},
|
||||
{
|
||||
name: "missing summary",
|
||||
@@ -87,7 +87,7 @@ func TestValidateTodayRejectsInvalidInput(t *testing.T) {
|
||||
{
|
||||
name: "forecast discussion wrong type",
|
||||
in: `{"summary":"Showers are likely today.","forecast_discussion":"A front will keep rain chances elevated."}`,
|
||||
want: "cannot unmarshal string",
|
||||
want: "forecast discussion must be an array",
|
||||
},
|
||||
{
|
||||
name: "multiple values",
|
||||
|
||||
Reference in New Issue
Block a user