From 2d712d39dc559250592cbd39f8a0da834adaf405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roberto=20Abdelkader=20Mart=C3=ADnez=20P=C3=A9rez?= Date: Thu, 3 Oct 2019 20:56:53 +0200 Subject: [PATCH] Adjust current implementation to accomodate content-type and test to check it --- internal/client/route_remove.go | 2 +- internal/client/route_remove_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/client/route_remove.go b/internal/client/route_remove.go index fc53a5a..bf0fbef 100644 --- a/internal/client/route_remove.go +++ b/internal/client/route_remove.go @@ -6,5 +6,5 @@ import ( func RemoveRoute(host, id string) error { url := host + "/routes/" + id - return http.Delete(url, nil, nil) + return http.Delete(url, "application/json", nil, nil) } diff --git a/internal/client/route_remove_test.go b/internal/client/route_remove_test.go index 6c85b83..4095b02 100644 --- a/internal/client/route_remove_test.go +++ b/internal/client/route_remove_test.go @@ -14,7 +14,7 @@ func TestRemoveRouteExistent(t *testing.T) { ) defer gock.Off() - gock.New(host).Delete("/routes/" + routeID).Reply(http.StatusNoContent) + gock.New(host).Delete("/routes/" + routeID).MatchType("json").Reply(http.StatusNoContent) err := RemoveRoute(host, routeID) if err != nil {