From 267400a3a5125fb32aaa50361222bbef01bb886d Mon Sep 17 00:00:00 2001 From: wilso199 Date: Sun, 2 Aug 2020 22:37:47 -0400 Subject: [PATCH] Cleaning up formatting errors and updating test to use named api call --- command/pr.go | 2 +- command/pr_checkout_test.go | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/command/pr.go b/command/pr.go index 70594b8d0..96e0a365c 100644 --- a/command/pr.go +++ b/command/pr.go @@ -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) diff --git a/command/pr_checkout_test.go b/command/pr_checkout_test.go index 8e5f0f6b7..b9c3fd34b 100644 --- a/command/pr_checkout_test.go +++ b/command/pr_checkout_test.go @@ -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