fix test of config endpoint

This commit is contained in:
Sonja Happ 2021-08-27 12:11:46 +02:00
parent 8ac188c942
commit 13783dd2f5

View file

@ -38,10 +38,11 @@ func TestConfig(t *testing.T) {
assert.NoError(t, err)
router = gin.Default()
api := router.Group("/api/v2")
RegisterConfigEndpoint(router.Group("/config"))
RegisterConfigEndpoint(api.Group("/config"))
code, resp, err := helper.TestEndpoint(router, "", "config", http.MethodGet, nil)
code, resp, err := helper.TestEndpoint(router, "", "/api/v2/config", http.MethodGet, nil)
assert.NoError(t, err)
assert.Equalf(t, 200, code, "Response body: \n%v\n", resp)
}