From f2afbbce7479f5de509fb1785282fd8a9afff412 Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Fri, 20 Dec 2019 12:07:53 -0800 Subject: [PATCH] Fix test output --- command/issue_test.go | 6 +++++- command/pr_create_test.go | 12 ++++++++++-- command/pr_test.go | 6 +++++- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/command/issue_test.go b/command/issue_test.go index 47924e865..78189e4c7 100644 --- a/command/issue_test.go +++ b/command/issue_test.go @@ -133,7 +133,11 @@ func TestIssueList_withFlags(t *testing.T) { } eq(t, output.String(), "") - eq(t, output.Stderr(), "No issues match your search\n") + eq(t, output.Stderr(), ` +Issues for OWNER/REPO + +No issues match your search +`) bodyBytes, _ := ioutil.ReadAll(http.Requests[0].Body) reqBody := struct { diff --git a/command/pr_create_test.go b/command/pr_create_test.go index badfe7204..96ac2eb25 100644 --- a/command/pr_create_test.go +++ b/command/pr_create_test.go @@ -116,7 +116,11 @@ func TestPRCreate_web(t *testing.T) { eq(t, err, nil) eq(t, output.String(), "") - eq(t, output.Stderr(), "Opening https://github.com/OWNER/REPO/pull/feature in your browser.\n") + eq(t, output.Stderr(), ` +Creating pull request for feature into master in OWNER/REPO + +Opening https://github.com/OWNER/REPO/pull/feature in your browser. +`) eq(t, len(ranCommands), 3) eq(t, strings.Join(ranCommands[1], " "), "git push --set-upstream origin HEAD:feature") @@ -155,5 +159,9 @@ func TestPRCreate_ReportsUncommittedChanges(t *testing.T) { eq(t, err, nil) eq(t, output.String(), "https://github.com/OWNER/REPO/pull/12\n") - eq(t, output.Stderr(), "Warning: 1 uncommitted change\n") + eq(t, output.Stderr(), `Warning: 1 uncommitted change + +Creating pull request for feature into master in OWNER/REPO + +`) } diff --git a/command/pr_test.go b/command/pr_test.go index 91ec11a13..360b6d852 100644 --- a/command/pr_test.go +++ b/command/pr_test.go @@ -183,7 +183,11 @@ func TestPRList_filtering(t *testing.T) { } eq(t, output.String(), "") - eq(t, output.Stderr(), "No pull requests match your search\n") + eq(t, output.Stderr(), ` +Pull requests for OWNER/REPO + +No pull requests match your search +`) bodyBytes, _ := ioutil.ReadAll(http.Requests[0].Body) reqBody := struct {