-
Notifications
You must be signed in to change notification settings - Fork 111
Closed
Description
package main
import (
"fmt"
"gopkg.in/h2non/gock.v1"
"net/http"
)
func main() {
defer gock.Off()
gock.New("https://blah.com").Path("/path").
AddMatcher(func(request *http.Request, request2 *gock.Request) (b bool, e error) {
fmt.Println("Matcher001")
return false, nil
}).
Reply(200)
gock.New("https://blah.com").Path("/path").
AddMatcher(func(request *http.Request, request2 *gock.Request) (b bool, e error) {
fmt.Println("Matcher002")
return false, nil
}).
Reply(200)
gock.New("https://blah.com").Path("/path").
AddMatcher(func(request *http.Request, request2 *gock.Request) (b bool, e error) {
fmt.Println("FinalMatcher")
return true, nil
}).
Reply(200)
http.Get("https://blah.com/path")
}
Expected Output:
Matcher001
Matcher002
FinalMatcher
Actual Output:
Matcher001
Matcher001
Matcher001
Metadata
Metadata
Assignees
Labels
No labels