Test pr url lock
This commit is contained in:
parent
c0658b7ab4
commit
2ea5f03b43
1 changed files with 17 additions and 0 deletions
|
|
@ -79,6 +79,23 @@ func TestIssueFromArgWithFields(t *testing.T) {
|
|||
wantIssue: 13,
|
||||
wantRepo: "https://example.org/OWNER/REPO",
|
||||
},
|
||||
{
|
||||
name: "PR URL argument",
|
||||
args: args{
|
||||
selector: "https://example.org/OWNER/REPO/pull/13#comment-123",
|
||||
baseRepoFn: nil,
|
||||
},
|
||||
httpStub: func(r *httpmock.Registry) {
|
||||
r.Register(
|
||||
httpmock.GraphQL(`query IssueByNumber\b`),
|
||||
httpmock.StringResponse(`{"data":{"repository":{
|
||||
"hasIssuesEnabled": true,
|
||||
"issue":{"number":13}
|
||||
}}}`))
|
||||
},
|
||||
wantIssue: 13,
|
||||
wantRepo: "https://example.org/OWNER/REPO",
|
||||
},
|
||||
{
|
||||
name: "project cards permission issue",
|
||||
args: args{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue