Tests for consolidated project tools
(t *testing.T)
| 18 | // Tests for consolidated project tools |
| 19 | |
| 20 | func Test_ProjectsList(t *testing.T) { |
| 21 | // Verify tool definition once |
| 22 | toolDef := ProjectsList(translations.NullTranslationHelper) |
| 23 | require.NoError(t, toolsnaps.Test(toolDef.Tool.Name, toolDef.Tool)) |
| 24 | |
| 25 | assert.Equal(t, "projects_list", toolDef.Tool.Name) |
| 26 | assert.NotEmpty(t, toolDef.Tool.Description) |
| 27 | inputSchema := toolDef.Tool.InputSchema.(*jsonschema.Schema) |
| 28 | assert.Contains(t, inputSchema.Properties, "method") |
| 29 | assert.Contains(t, inputSchema.Properties, "owner") |
| 30 | assert.Contains(t, inputSchema.Properties, "owner_type") |
| 31 | assert.Contains(t, inputSchema.Properties, "project_number") |
| 32 | assert.Contains(t, inputSchema.Properties, "query") |
| 33 | assert.Contains(t, inputSchema.Properties, "fields") |
| 34 | assert.ElementsMatch(t, inputSchema.Required, []string{"method", "owner"}) |
| 35 | } |
| 36 | |
| 37 | func Test_ProjectsList_ListProjects(t *testing.T) { |
| 38 | toolDef := ProjectsList(translations.NullTranslationHelper) |
nothing calls this directly
no test coverage detected