Closed z2665 closed 5 years ago
The mocked requests is only reachable once, by default. So if you want to use it multiple times, you can either specify the exact number using Times(2)
or make it persistent Persist()
.
gock.New("http://big.tree.com").
MatchParams(map[string]string{
"moduleName": "MySQL",
}).
Persist().
Reply(200).
BodyString(data)
Thanks, I can use Persist to keep the same behavior likes before version.
I have a code. It can work before 1.0.14. but in 1.0.14. It can't work
the result is