h2non / gock

HTTP traffic mocking and testing made easy in Go ༼ʘ̚ل͜ʘ̚༽
https://pkg.go.dev/github.com/h2non/gock
MIT License
2.04k stars 106 forks source link

fix: Broken example #79

Closed GrahamWalters closed 3 years ago

GrahamWalters commented 3 years ago

Resolves this https://github.com/h2non/gock/pull/78#issuecomment-763704077

Sorry for not catching this the first time round. FYI this test is failing for me locally. I'm not sure why, but it passed on the CI link you sent, so I've left it alone.

$ go test -race ./_examples/*/
--- FAIL: TestReplyError (0.00s)
    st.go:41: 
        reply_error_test.go:20: should be == 
                have: (string) Get "http://foo.com/bar": Error dude!
                want: (string) Get http://foo.com/bar: Error dude!
h2non commented 3 years ago

Thank you!