Cleaning up formatting errors and updating test to use named api call

This commit is contained in:
wilso199 2020-08-02 22:37:47 -04:00
parent 4250906c82
commit 267400a3a5
2 changed files with 3 additions and 6 deletions

View file

@ -29,7 +29,7 @@ func init() {
RootCmd.AddCommand(prCmd)
prCmd.AddCommand(prCheckoutCmd)
prCheckoutCmd.Flags().BoolP("recurse-submodules", "", false, "Update all active submodules (recursively)")
prCmd.AddCommand(prCreateCmd)
prCmd.AddCommand(prStatusCmd)
prCmd.AddCommand(prCloseCmd)

View file

@ -578,7 +578,7 @@ func TestPRCheckout_recurseSubmodules(t *testing.T) {
http := initFakeHTTP()
http.StubRepoResponse("OWNER", "REPO")
http.StubResponse(200, bytes.NewBufferString(`
http.Register(httpmock.GraphQL(`query PullRequestByNumber\b`), httpmock.StringResponse(`
{ "data": { "repository": { "pullRequest": {
"number": 123,
"headRefName": "feature",
@ -586,10 +586,7 @@ func TestPRCheckout_recurseSubmodules(t *testing.T) {
"login": "hubot"
},
"headRepository": {
"name": "REPO",
"defaultBranchRef": {
"name": "master"
}
"name": "REPO"
},
"isCrossRepository": false,
"maintainerCanModify": false