fix
This commit is contained in:
@@ -247,6 +247,15 @@ func TestAuthSessionCoreEndpoints(t *testing.T) {
|
||||
t.Fatalf("create api-key payload=%v", created)
|
||||
}
|
||||
|
||||
rec = do(http.MethodPatch, "/api/api-keys/"+keyID, `{"name":"auth-smoke-key-renamed"}`, true)
|
||||
if rec.Code != http.StatusOK {
|
||||
t.Fatalf("rename api-key status=%d body=%s", rec.Code, rec.Body.String())
|
||||
}
|
||||
renamed := decode(t, rec)
|
||||
if fmt.Sprint(renamed["name"]) != "auth-smoke-key-renamed" {
|
||||
t.Fatalf("rename api-key name=%v", renamed["name"])
|
||||
}
|
||||
|
||||
// Public v1 with the new key (CSRF skipped).
|
||||
v1 := httptest.NewRecorder()
|
||||
v1Req := httptest.NewRequest(http.MethodGet, "/api/v1/products?limit=1", nil)
|
||||
|
||||
Reference in New Issue
Block a user