(t *testing.T)
| 130 | } |
| 131 | |
| 132 | func TestExtractCommentID(t *testing.T) { |
| 133 | tests := []struct { |
| 134 | name string |
| 135 | url string |
| 136 | expected string |
| 137 | }{ |
| 138 | {"issuecomment", "https://github.com/owner/repo/issues/123#issuecomment-456789", "456789"}, |
| 139 | {"comments path", "https://github.com/owner/repo/issues/comments/789012", "789012"}, |
| 140 | {"no comment", "https://github.com/owner/repo/issues/123", ""}, |
| 141 | {"empty", "", ""}, |
| 142 | } |
| 143 | |
| 144 | for _, tt := range tests { |
| 145 | t.Run(tt.name, func(t *testing.T) { |
| 146 | assert.Equal(t, tt.expected, extractCommentID(tt.url), "extracted comment ID") |
| 147 | }) |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | func TestResolveItemRepo(t *testing.T) { |
| 152 | item := CreatedItemReport{Repo: "explicit/repo"} |
nothing calls this directly
no test coverage detected