File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,34 @@ func TestPRStatus(t *testing.T) {
9595 }
9696}
9797
98+ func TestPRStatus_blankSlate (t * testing.T ) {
99+ initBlankContext ("OWNER/REPO" , "blueberries" )
100+ http := initFakeHTTP ()
101+
102+ http .StubResponse (200 , bytes .NewBufferString (`
103+ { "data": {} }
104+ ` ))
105+
106+ output , err := RunCommand (prStatusCmd , "pr status" )
107+ if err != nil {
108+ t .Errorf ("error running command `pr status`: %v" , err )
109+ }
110+
111+ expected := `Current branch
112+ There is no pull request associated with [blueberries]
113+
114+ Created by you
115+ You have no open pull requests
116+
117+ Requesting a code review from you
118+ You have no pull requests to review
119+
120+ `
121+ if output .String () != expected {
122+ t .Errorf ("expected %q, got %q" , expected , output .String ())
123+ }
124+ }
125+
98126func TestPRList (t * testing.T ) {
99127 initBlankContext ("OWNER/REPO" , "master" )
100128 http := initFakeHTTP ()
You can’t perform that action at this time.
0 commit comments