summaryrefslogtreecommitdiff
path: root/test/integration/http.go
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-05-14 07:18:35 -0600
committermo khan <mo@mokhan.ca>2025-05-14 07:18:35 -0600
commite0882e69c350a685c586a00d72a92e306374c146 (patch)
tree663f69ffb883f29bc14594f80333eab8907e7ded /test/integration/http.go
parente271fcfaf93547621a7f58d1bdef49b569ceb4f8 (diff)
test: use generic type
Diffstat (limited to 'test/integration/http.go')
-rw-r--r--test/integration/http.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/integration/http.go b/test/integration/http.go
index 452c56d..20991a2 100644
--- a/test/integration/http.go
+++ b/test/integration/http.go
@@ -36,8 +36,8 @@ func HttpGet(t *testing.T, ctx context.Context, path string) *http.Response {
return response
}
-func JSONBody(t *testing.T, r *http.Response) map[string]interface{} {
- item, err := serde.FromJSON[map[string]interface{}](r.Body)
+func JSONBody[T any](t *testing.T, r *http.Response) T {
+ item, err := serde.FromJSON[T](r.Body)
require.NoError(t, err)
return item
}