From b6dd9ecacfbdc4dca38222af951d9c5a36610cf5 Mon Sep 17 00:00:00 2001 From: Will McCutchen <will@mccutch.org> Date: Sat, 15 Oct 2016 17:33:48 -0700 Subject: [PATCH] Tests for /get should use correct response type --- httpbin/handlers_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/httpbin/handlers_test.go b/httpbin/handlers_test.go index 6bc1757..43e681e 100644 --- a/httpbin/handlers_test.go +++ b/httpbin/handlers_test.go @@ -95,7 +95,7 @@ func TestGet__Basic(t *testing.T) { assertStatusCode(t, w, http.StatusOK) assertContentType(t, w, jsonContentType) - var resp *bodyResponse + var resp *getResponse err := json.Unmarshal(w.Body.Bytes(), &resp) if err != nil { t.Fatalf("failed to unmarshal body %s from JSON: %s", w.Body, err) @@ -138,7 +138,7 @@ func TestGet__WithParams(t *testing.T) { assertStatusCode(t, w, http.StatusOK) assertContentType(t, w, jsonContentType) - var resp *bodyResponse + var resp *getResponse err := json.Unmarshal(w.Body.Bytes(), &resp) if err != nil { t.Fatalf("failed to unmarshal body %s from JSON: %s", w.Body, err) @@ -228,7 +228,7 @@ func TestGet__XForwardedProto(t *testing.T) { w := httptest.NewRecorder() handler.ServeHTTP(w, r) - var resp *bodyResponse + var resp *getResponse err := json.Unmarshal(w.Body.Bytes(), &resp) if err != nil { t.Fatalf("failed to unmarshal body %s from JSON: %s", w.Body, err) -- GitLab