Use new httpmock API in test
This commit is contained in:
parent
d59ebfd6e8
commit
a395290d87
1 changed files with 6 additions and 5 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue