@@ -409,7 +409,7 @@ func TestPRView_preview(t *testing.T) {
409409 defer jsonFile .Close ()
410410 http .StubResponse (200 , jsonFile )
411411
412- output , err := RunCommand (prViewCmd , "pr view -p 12" )
412+ output , err := RunCommand (prViewCmd , "pr view 12" )
413413 if err != nil {
414414 t .Errorf ("error running command `pr view`: %v" , err )
415415 }
@@ -437,7 +437,7 @@ func TestPRView_previewCurrentBranch(t *testing.T) {
437437 })
438438 defer restoreCmd ()
439439
440- output , err := RunCommand (prViewCmd , "pr view -p " )
440+ output , err := RunCommand (prViewCmd , "pr view" )
441441 if err != nil {
442442 t .Errorf ("error running command `pr view`: %v" , err )
443443 }
@@ -465,7 +465,7 @@ func TestPRView_previewCurrentBranchWithEmptyBody(t *testing.T) {
465465 })
466466 defer restoreCmd ()
467467
468- output , err := RunCommand (prViewCmd , "pr view -p " )
468+ output , err := RunCommand (prViewCmd , "pr view" )
469469 if err != nil {
470470 t .Errorf ("error running command `pr view`: %v" , err )
471471 }
@@ -478,7 +478,7 @@ func TestPRView_previewCurrentBranchWithEmptyBody(t *testing.T) {
478478 "View this pull request on GitHub: https://github.com/OWNER/REPO/pull/10" )
479479}
480480
481- func TestPRView_currentBranch (t * testing.T ) {
481+ func TestPRView_web_currentBranch (t * testing.T ) {
482482 initBlankContext ("OWNER/REPO" , "blueberries" )
483483 http := initFakeHTTP ()
484484 http .StubRepoResponse ("OWNER" , "REPO" )
@@ -499,7 +499,7 @@ func TestPRView_currentBranch(t *testing.T) {
499499 })
500500 defer restoreCmd ()
501501
502- output , err := RunCommand (prViewCmd , "pr view" )
502+ output , err := RunCommand (prViewCmd , "pr view -w " )
503503 if err != nil {
504504 t .Errorf ("error running command `pr view`: %v" , err )
505505 }
@@ -516,7 +516,7 @@ func TestPRView_currentBranch(t *testing.T) {
516516 }
517517}
518518
519- func TestPRView_noResultsForBranch (t * testing.T ) {
519+ func TestPRView_web_noResultsForBranch (t * testing.T ) {
520520 initBlankContext ("OWNER/REPO" , "blueberries" )
521521 http := initFakeHTTP ()
522522 http .StubRepoResponse ("OWNER" , "REPO" )
@@ -537,7 +537,7 @@ func TestPRView_noResultsForBranch(t *testing.T) {
537537 })
538538 defer restoreCmd ()
539539
540- _ , err := RunCommand (prViewCmd , "pr view" )
540+ _ , err := RunCommand (prViewCmd , "pr view -w " )
541541 if err == nil || err .Error () != `no open pull requests found for branch "blueberries"` {
542542 t .Errorf ("error running command `pr view`: %v" , err )
543543 }
@@ -547,7 +547,7 @@ func TestPRView_noResultsForBranch(t *testing.T) {
547547 }
548548}
549549
550- func TestPRView_numberArg (t * testing.T ) {
550+ func TestPRView_web_numberArg (t * testing.T ) {
551551 initBlankContext ("OWNER/REPO" , "master" )
552552 http := initFakeHTTP ()
553553 http .StubRepoResponse ("OWNER" , "REPO" )
@@ -565,7 +565,7 @@ func TestPRView_numberArg(t *testing.T) {
565565 })
566566 defer restoreCmd ()
567567
568- output , err := RunCommand (prViewCmd , "pr view 23" )
568+ output , err := RunCommand (prViewCmd , "pr view -w 23" )
569569 if err != nil {
570570 t .Errorf ("error running command `pr view`: %v" , err )
571571 }
@@ -579,7 +579,7 @@ func TestPRView_numberArg(t *testing.T) {
579579 eq (t , url , "https://github.com/OWNER/REPO/pull/23" )
580580}
581581
582- func TestPRView_numberArgWithHash (t * testing.T ) {
582+ func TestPRView_web_numberArgWithHash (t * testing.T ) {
583583 initBlankContext ("OWNER/REPO" , "master" )
584584 http := initFakeHTTP ()
585585 http .StubRepoResponse ("OWNER" , "REPO" )
@@ -597,7 +597,7 @@ func TestPRView_numberArgWithHash(t *testing.T) {
597597 })
598598 defer restoreCmd ()
599599
600- output , err := RunCommand (prViewCmd , "pr view \" #23\" " )
600+ output , err := RunCommand (prViewCmd , "pr view -w \" #23\" " )
601601 if err != nil {
602602 t .Errorf ("error running command `pr view`: %v" , err )
603603 }
@@ -611,7 +611,7 @@ func TestPRView_numberArgWithHash(t *testing.T) {
611611 eq (t , url , "https://github.com/OWNER/REPO/pull/23" )
612612}
613613
614- func TestPRView_urlArg (t * testing.T ) {
614+ func TestPRView_web_urlArg (t * testing.T ) {
615615 initBlankContext ("OWNER/REPO" , "master" )
616616 http := initFakeHTTP ()
617617
@@ -628,7 +628,7 @@ func TestPRView_urlArg(t *testing.T) {
628628 })
629629 defer restoreCmd ()
630630
631- output , err := RunCommand (prViewCmd , "pr view https://github.com/OWNER/REPO/pull/23/files" )
631+ output , err := RunCommand (prViewCmd , "pr view -w https://github.com/OWNER/REPO/pull/23/files" )
632632 if err != nil {
633633 t .Errorf ("error running command `pr view`: %v" , err )
634634 }
@@ -642,7 +642,7 @@ func TestPRView_urlArg(t *testing.T) {
642642 eq (t , url , "https://github.com/OWNER/REPO/pull/23" )
643643}
644644
645- func TestPRView_branchArg (t * testing.T ) {
645+ func TestPRView_web_branchArg (t * testing.T ) {
646646 initBlankContext ("OWNER/REPO" , "master" )
647647 http := initFakeHTTP ()
648648 http .StubRepoResponse ("OWNER" , "REPO" )
@@ -662,7 +662,7 @@ func TestPRView_branchArg(t *testing.T) {
662662 })
663663 defer restoreCmd ()
664664
665- output , err := RunCommand (prViewCmd , "pr view blueberries" )
665+ output , err := RunCommand (prViewCmd , "pr view -w blueberries" )
666666 if err != nil {
667667 t .Errorf ("error running command `pr view`: %v" , err )
668668 }
@@ -676,7 +676,7 @@ func TestPRView_branchArg(t *testing.T) {
676676 eq (t , url , "https://github.com/OWNER/REPO/pull/23" )
677677}
678678
679- func TestPRView_branchWithOwnerArg (t * testing.T ) {
679+ func TestPRView_web_branchWithOwnerArg (t * testing.T ) {
680680 initBlankContext ("OWNER/REPO" , "master" )
681681 http := initFakeHTTP ()
682682 http .StubRepoResponse ("OWNER" , "REPO" )
@@ -697,7 +697,7 @@ func TestPRView_branchWithOwnerArg(t *testing.T) {
697697 })
698698 defer restoreCmd ()
699699
700- output , err := RunCommand (prViewCmd , "pr view hubot:blueberries" )
700+ output , err := RunCommand (prViewCmd , "pr view -w hubot:blueberries" )
701701 if err != nil {
702702 t .Errorf ("error running command `pr view`: %v" , err )
703703 }
0 commit comments