Fix method used in client.AddRoute()

Co-authored-by: César Gallego <gallego.cesar@gmail.com>
This commit is contained in:
pancho horrillo
2019-10-17 16:58:38 +02:00
parent f5d7521a45
commit 81cbea4ff8
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -16,5 +16,5 @@ func AddRoute(host, path, method, entrypoint, command string, w io.Writer) error
"url_pattern": path,
"entrypoint": entrypoint,
"command": command})
return http.Put(url, "application/json", bytes.NewReader(body), w)
return http.Post(url, "application/json", bytes.NewReader(body), w)
}
+1 -1
View File
@@ -10,7 +10,7 @@ import (
func TestSuccessOnCorrectRoute(t *testing.T) {
defer gock.Off()
gock.New("http://localhost").
Put("/routes").
Post("/routes").
MatchType("json").
JSON(map[string]string{
"method": "GET",