fix status code 200 (#47818)

This commit is contained in:
ying-jeanne
2022-04-15 14:01:58 +02:00
committed by GitHub
parent f263cad8ab
commit 7ddae870e7
44 changed files with 166 additions and 152 deletions

View File

@@ -111,7 +111,7 @@ func TestMiddlewareContext(t *testing.T) {
NavTree: []*dtos.NavLink{},
}
t.Log("Calling HTML", "data", data)
c.HTML(200, "index-template", data)
c.HTML(http.StatusOK, "index-template", data)
t.Log("Returned HTML with code 200")
}
sc.fakeReq("GET", "/").exec()
@@ -616,7 +616,7 @@ func middlewareScenario(t *testing.T, desc string, fn scenarioFunc, cbs ...func(
t.Log("Returning JSON OK")
resp := make(map[string]interface{})
resp["message"] = "OK"
c.JSON(200, resp)
c.JSON(http.StatusOK, resp)
}
}