MCPcopy Create free account
hub / github.com/cli/cli / TestIssueRepositoryDatabaseID

Function TestIssueRepositoryDatabaseID

api/queries_issue_test.go:9–32  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

7)
8
9func TestIssueRepositoryDatabaseID(t *testing.T) {
10 tests := []struct {
11 name string
12 issue Issue
13 want int64
14 }{
15 {
16 name: "the repository field was requested",
17 issue: Issue{Repository: &PRRepository{DatabaseID: 1234}},
18 want: 1234,
19 },
20 {
21 name: "the repository field was not requested",
22 issue: Issue{},
23 want: 0,
24 },
25 }
26
27 for _, tt := range tests {
28 t.Run(tt.name, func(t *testing.T) {
29 assert.Equal(t, tt.want, tt.issue.RepositoryDatabaseID())
30 })
31 }
32}
33
34func TestIssueRepositoryViewerPermission(t *testing.T) {
35 tests := []struct {

Callers

nothing calls this directly

Calls 3

EqualMethod · 0.80
RunMethod · 0.65
RepositoryDatabaseIDMethod · 0.65

Tested by

no test coverage detected