MCPcopy Index your code
hub / github.com/github/github-mcp-server / Test_ProjectsList

Function Test_ProjectsList

pkg/github/projects_test.go:20–35  ·  view source on GitHub ↗

Tests for consolidated project tools

(t *testing.T)

Source from the content-addressed store, hash-verified

18// Tests for consolidated project tools
19
20func 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
37func Test_ProjectsList_ListProjects(t *testing.T) {
38 toolDef := ProjectsList(translations.NullTranslationHelper)

Callers

nothing calls this directly

Calls 2

TestFunction · 0.92
ProjectsListFunction · 0.85

Tested by

no test coverage detected