mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-13 17:47:51 +00:00
test(api): align tests with new envelope codes
Update API handler tests to expect numeric `code`, `success` messages, and new envelope fields (`trace_id`, `details`), matching recent response envelope changes.
This commit is contained in:
@@ -73,8 +73,8 @@ func TestLogWebhookConfigCRUD(t *testing.T) {
|
||||
|
||||
var got service.LogWebhookConfig
|
||||
env := decodeEnvelope(t, getRR, &got)
|
||||
if env.Code != "ok" {
|
||||
t.Fatalf("expected code=ok, got %q", env.Code)
|
||||
if env.Code != 0 {
|
||||
t.Fatalf("expected code=0, got %d", env.Code)
|
||||
}
|
||||
if !got.Enabled || got.URL == "" || got.Threshold != 3 {
|
||||
t.Fatalf("unexpected webhook config: %+v", got)
|
||||
|
||||
Reference in New Issue
Block a user