Fix method used in client.AddRoute()
Co-authored-by: César Gallego <gallego.cesar@gmail.com>
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user