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

Function Test_ProjectsWrite

pkg/github/projects_test.go:816–841  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

814}
815
816func Test_ProjectsWrite(t *testing.T) {
817 // Verify tool definition once
818 toolDef := ProjectsWrite(translations.NullTranslationHelper)
819 require.NoError(t, toolsnaps.Test(toolDef.Tool.Name, toolDef.Tool))
820
821 assert.Equal(t, "projects_write", toolDef.Tool.Name)
822 assert.NotEmpty(t, toolDef.Tool.Description)
823 inputSchema := toolDef.Tool.InputSchema.(*jsonschema.Schema)
824 assert.Contains(t, inputSchema.Properties, "method")
825 assert.Contains(t, inputSchema.Properties, "owner")
826 assert.Contains(t, inputSchema.Properties, "owner_type")
827 assert.Contains(t, inputSchema.Properties, "project_number")
828 assert.Contains(t, inputSchema.Properties, "item_id")
829 assert.Contains(t, inputSchema.Properties, "item_type")
830 assert.Contains(t, inputSchema.Properties, "item_owner")
831 assert.Contains(t, inputSchema.Properties, "item_repo")
832 assert.Contains(t, inputSchema.Properties, "issue_number")
833 assert.Contains(t, inputSchema.Properties, "pull_request_number")
834 assert.Contains(t, inputSchema.Properties, "updated_field")
835 assert.ElementsMatch(t, inputSchema.Required, []string{"method", "owner"})
836
837 // Verify DestructiveHint is set
838 assert.NotNil(t, toolDef.Tool.Annotations)
839 assert.NotNil(t, toolDef.Tool.Annotations.DestructiveHint)
840 assert.True(t, *toolDef.Tool.Annotations.DestructiveHint)
841}
842
843func Test_ProjectsWrite_AddProjectItem(t *testing.T) {
844 toolDef := ProjectsWrite(translations.NullTranslationHelper)

Callers

nothing calls this directly

Calls 2

TestFunction · 0.92
ProjectsWriteFunction · 0.85

Tested by

no test coverage detected