@@ -391,7 +391,7 @@ func TestPRView_preview(t *testing.T) {
391391 defer jsonFile .Close ()
392392 http .StubResponse (200 , jsonFile )
393393
394- output , err := RunCommand (prViewCmd , "pr view -p 12" )
394+ output , err := RunCommand (prViewCmd , "pr view 12" )
395395 if err != nil {
396396 t .Errorf ("error running command `pr view`: %v" , err )
397397 }
@@ -426,7 +426,7 @@ func TestPRView_previewCurrentBranch(t *testing.T) {
426426 })
427427 defer restoreCmd ()
428428
429- output , err := RunCommand (prViewCmd , "pr view -p " )
429+ output , err := RunCommand (prViewCmd , "pr view" )
430430 if err != nil {
431431 t .Errorf ("error running command `pr view`: %v" , err )
432432 }
@@ -461,7 +461,7 @@ func TestPRView_previewCurrentBranchWithEmptyBody(t *testing.T) {
461461 })
462462 defer restoreCmd ()
463463
464- output , err := RunCommand (prViewCmd , "pr view -p " )
464+ output , err := RunCommand (prViewCmd , "pr view" )
465465 if err != nil {
466466 t .Errorf ("error running command `pr view`: %v" , err )
467467 }
@@ -481,7 +481,7 @@ func TestPRView_previewCurrentBranchWithEmptyBody(t *testing.T) {
481481 }
482482}
483483
484- func TestPRView_currentBranch (t * testing.T ) {
484+ func TestPRView_web_currentBranch (t * testing.T ) {
485485 initBlankContext ("OWNER/REPO" , "blueberries" )
486486 http := initFakeHTTP ()
487487 http .StubRepoResponse ("OWNER" , "REPO" )
@@ -502,7 +502,7 @@ func TestPRView_currentBranch(t *testing.T) {
502502 })
503503 defer restoreCmd ()
504504
505- output , err := RunCommand (prViewCmd , "pr view" )
505+ output , err := RunCommand (prViewCmd , "pr view -w " )
506506 if err != nil {
507507 t .Errorf ("error running command `pr view`: %v" , err )
508508 }
@@ -519,7 +519,7 @@ func TestPRView_currentBranch(t *testing.T) {
519519 }
520520}
521521
522- func TestPRView_noResultsForBranch (t * testing.T ) {
522+ func TestPRView_web_noResultsForBranch (t * testing.T ) {
523523 initBlankContext ("OWNER/REPO" , "blueberries" )
524524 http := initFakeHTTP ()
525525 http .StubRepoResponse ("OWNER" , "REPO" )
@@ -540,7 +540,7 @@ func TestPRView_noResultsForBranch(t *testing.T) {
540540 })
541541 defer restoreCmd ()
542542
543- _ , err := RunCommand (prViewCmd , "pr view" )
543+ _ , err := RunCommand (prViewCmd , "pr view -w " )
544544 if err == nil || err .Error () != `no open pull requests found for branch "blueberries"` {
545545 t .Errorf ("error running command `pr view`: %v" , err )
546546 }
@@ -550,7 +550,7 @@ func TestPRView_noResultsForBranch(t *testing.T) {
550550 }
551551}
552552
553- func TestPRView_numberArg (t * testing.T ) {
553+ func TestPRView_web_numberArg (t * testing.T ) {
554554 initBlankContext ("OWNER/REPO" , "master" )
555555 http := initFakeHTTP ()
556556 http .StubRepoResponse ("OWNER" , "REPO" )
@@ -568,7 +568,7 @@ func TestPRView_numberArg(t *testing.T) {
568568 })
569569 defer restoreCmd ()
570570
571- output , err := RunCommand (prViewCmd , "pr view 23" )
571+ output , err := RunCommand (prViewCmd , "pr view -w 23" )
572572 if err != nil {
573573 t .Errorf ("error running command `pr view`: %v" , err )
574574 }
@@ -582,7 +582,7 @@ func TestPRView_numberArg(t *testing.T) {
582582 eq (t , url , "https://github.com/OWNER/REPO/pull/23" )
583583}
584584
585- func TestPRView_numberArgWithHash (t * testing.T ) {
585+ func TestPRView_web_numberArgWithHash (t * testing.T ) {
586586 initBlankContext ("OWNER/REPO" , "master" )
587587 http := initFakeHTTP ()
588588 http .StubRepoResponse ("OWNER" , "REPO" )
@@ -600,7 +600,7 @@ func TestPRView_numberArgWithHash(t *testing.T) {
600600 })
601601 defer restoreCmd ()
602602
603- output , err := RunCommand (prViewCmd , "pr view \" #23\" " )
603+ output , err := RunCommand (prViewCmd , "pr view -w \" #23\" " )
604604 if err != nil {
605605 t .Errorf ("error running command `pr view`: %v" , err )
606606 }
@@ -614,7 +614,7 @@ func TestPRView_numberArgWithHash(t *testing.T) {
614614 eq (t , url , "https://github.com/OWNER/REPO/pull/23" )
615615}
616616
617- func TestPRView_urlArg (t * testing.T ) {
617+ func TestPRView_web_urlArg (t * testing.T ) {
618618 initBlankContext ("OWNER/REPO" , "master" )
619619 http := initFakeHTTP ()
620620 http .StubRepoResponse ("OWNER" , "REPO" )
@@ -632,7 +632,7 @@ func TestPRView_urlArg(t *testing.T) {
632632 })
633633 defer restoreCmd ()
634634
635- output , err := RunCommand (prViewCmd , "pr view https://github.com/OWNER/REPO/pull/23/files" )
635+ output , err := RunCommand (prViewCmd , "pr view -w https://github.com/OWNER/REPO/pull/23/files" )
636636 if err != nil {
637637 t .Errorf ("error running command `pr view`: %v" , err )
638638 }
@@ -646,7 +646,7 @@ func TestPRView_urlArg(t *testing.T) {
646646 eq (t , url , "https://github.com/OWNER/REPO/pull/23" )
647647}
648648
649- func TestPRView_branchArg (t * testing.T ) {
649+ func TestPRView_web_branchArg (t * testing.T ) {
650650 initBlankContext ("OWNER/REPO" , "master" )
651651 http := initFakeHTTP ()
652652 http .StubRepoResponse ("OWNER" , "REPO" )
@@ -666,7 +666,7 @@ func TestPRView_branchArg(t *testing.T) {
666666 })
667667 defer restoreCmd ()
668668
669- output , err := RunCommand (prViewCmd , "pr view blueberries" )
669+ output , err := RunCommand (prViewCmd , "pr view -w blueberries" )
670670 if err != nil {
671671 t .Errorf ("error running command `pr view`: %v" , err )
672672 }
@@ -680,7 +680,7 @@ func TestPRView_branchArg(t *testing.T) {
680680 eq (t , url , "https://github.com/OWNER/REPO/pull/23" )
681681}
682682
683- func TestPRView_branchWithOwnerArg (t * testing.T ) {
683+ func TestPRView_web_branchWithOwnerArg (t * testing.T ) {
684684 initBlankContext ("OWNER/REPO" , "master" )
685685 http := initFakeHTTP ()
686686 http .StubRepoResponse ("OWNER" , "REPO" )
@@ -701,7 +701,7 @@ func TestPRView_branchWithOwnerArg(t *testing.T) {
701701 })
702702 defer restoreCmd ()
703703
704- output , err := RunCommand (prViewCmd , "pr view hubot:blueberries" )
704+ output , err := RunCommand (prViewCmd , "pr view -w hubot:blueberries" )
705705 if err != nil {
706706 t .Errorf ("error running command `pr view`: %v" , err )
707707 }
0 commit comments