test pr number 0
This commit is contained in:
parent
8d9c9bcf50
commit
747f015f48
1 changed files with 13 additions and 0 deletions
|
|
@ -89,6 +89,19 @@ func TestFind(t *testing.T) {
|
|||
wantPR: 13,
|
||||
wantRepo: "https://github.com/ORIGINOWNER/REPO",
|
||||
},
|
||||
{
|
||||
name: "PR number 0 is invalid",
|
||||
args: args{
|
||||
selector: "0",
|
||||
fields: []string{"id", "number"},
|
||||
baseRepoFn: stubBaseRepoFn(ghrepo.New("ORIGINOWNER", "REPO"), nil),
|
||||
branchFn: func() (string, error) {
|
||||
return "blueberries", nil
|
||||
},
|
||||
branchConfig: stubBranchConfig(git.BranchConfig{}, nil),
|
||||
},
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
name: "number argument with base branch",
|
||||
args: args{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue