Test pr url lock

This commit is contained in:
t4kamura 2024-03-18 22:49:07 +09:00
parent c0658b7ab4
commit 2ea5f03b43

View file

@ -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{