Use new httpmock API in test

This commit is contained in:
Mislav Marohnić 2020-06-05 13:29:44 +02:00
parent d59ebfd6e8
commit a395290d87

View file

@ -517,11 +517,12 @@ func TestRepo_withoutUsername(t *testing.T) {
{ "data": { "viewer": {
"login": "OWNER"
}}}`))
http.StubResponse(200, bytes.NewBufferString(`
{ "data": { "repository": {
"parent": null
} } }
`))
http.Register(
httpmock.GraphQL(`\brepository\(`),
httpmock.StringResponse(`
{ "data": { "repository": {
"parent": null
} } }`))
cs, restore := test.InitCmdStubber()
defer restore()