(t *testing.T)
| 205 | } |
| 206 | |
| 207 | func TestGranularUpdateIssueTitle(t *testing.T) { |
| 208 | client := mustNewGHClient(t, MockHTTPClientWithHandlers(map[string]http.HandlerFunc{ |
| 209 | PatchReposIssuesByOwnerByRepoByIssueNumber: mockResponse(t, http.StatusOK, &gogithub.Issue{ |
| 210 | Number: gogithub.Ptr(42), |
| 211 | Title: gogithub.Ptr("New Title"), |
| 212 | }), |
| 213 | })) |
| 214 | deps := BaseDeps{Client: client} |
| 215 | serverTool := GranularUpdateIssueTitle(translations.NullTranslationHelper) |
| 216 | handler := serverTool.Handler(deps) |
| 217 | |
| 218 | request := createMCPRequest(map[string]any{ |
| 219 | "owner": "owner", |
| 220 | "repo": "repo", |
| 221 | "issue_number": float64(42), |
| 222 | "title": "New Title", |
| 223 | }) |
| 224 | result, err := handler(ContextWithDeps(context.Background(), deps), &request) |
| 225 | require.NoError(t, err) |
| 226 | assert.False(t, result.IsError) |
| 227 | } |
| 228 | |
| 229 | func TestGranularUpdateIssueBody(t *testing.T) { |
| 230 | client := mustNewGHClient(t, MockHTTPClientWithHandlers(map[string]http.HandlerFunc{ |
nothing calls this directly
no test coverage detected