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:
@@ -7,9 +7,11 @@ import (
|
||||
)
|
||||
|
||||
type testEnvelope struct {
|
||||
Code string `json:"code"`
|
||||
Code int `json:"code"`
|
||||
Data json.RawMessage `json:"data"`
|
||||
Message string `json:"message"`
|
||||
TraceID string `json:"trace_id"`
|
||||
Details any `json:"details,omitempty"`
|
||||
}
|
||||
|
||||
func decodeEnvelope(t *testing.T, rr *httptest.ResponseRecorder, out any) testEnvelope {
|
||||
|
||||
Reference in New Issue
Block a user