(t *testing.T)
| 227 | } |
| 228 | |
| 229 | func TestGranularUpdateIssueBody(t *testing.T) { |
| 230 | client := mustNewGHClient(t, MockHTTPClientWithHandlers(map[string]http.HandlerFunc{ |
| 231 | PatchReposIssuesByOwnerByRepoByIssueNumber: expectRequestBody(t, map[string]any{ |
| 232 | "body": "Updated body", |
| 233 | }).andThen(mockResponse(t, http.StatusOK, &gogithub.Issue{ |
| 234 | Number: gogithub.Ptr(1), |
| 235 | Body: gogithub.Ptr("Updated body"), |
| 236 | })), |
| 237 | })) |
| 238 | deps := BaseDeps{Client: client} |
| 239 | serverTool := GranularUpdateIssueBody(translations.NullTranslationHelper) |
| 240 | handler := serverTool.Handler(deps) |
| 241 | |
| 242 | request := createMCPRequest(map[string]any{ |
| 243 | "owner": "owner", |
| 244 | "repo": "repo", |
| 245 | "issue_number": float64(1), |
| 246 | "body": "Updated body", |
| 247 | }) |
| 248 | result, err := handler(ContextWithDeps(context.Background(), deps), &request) |
| 249 | require.NoError(t, err) |
| 250 | assert.False(t, result.IsError) |
| 251 | } |
| 252 | |
| 253 | func TestGranularUpdateIssueAssignees(t *testing.T) { |
| 254 | client := mustNewGHClient(t, MockHTTPClientWithHandlers(map[string]http.HandlerFunc{ |
nothing calls this directly
no test coverage detected