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

Function TestRemoveToolset

pkg/github/tools_test.go:88–121  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

86}
87
88func TestRemoveToolset(t *testing.T) {
89 tests := []struct {
90 name string
91 tools []string
92 toRemove string
93 expected []string
94 }{
95 {
96 name: "remove existing toolset",
97 tools: []string{"actions", "gists", "notifications"},
98 toRemove: "gists",
99 expected: []string{"actions", "notifications"},
100 },
101 {
102 name: "remove from empty slice",
103 tools: []string{},
104 toRemove: "actions",
105 expected: []string{},
106 },
107 {
108 name: "remove duplicate entries",
109 tools: []string{"actions", "gists", "actions", "notifications"},
110 toRemove: "actions",
111 expected: []string{"gists", "notifications"},
112 },
113 }
114
115 for _, tt := range tests {
116 t.Run(tt.name, func(t *testing.T) {
117 result := RemoveToolset(tt.tools, tt.toRemove)
118 assert.Equal(t, tt.expected, result)
119 })
120 }
121}
122
123func TestContainsToolset(t *testing.T) {
124 tests := []struct {

Callers

nothing calls this directly

Calls 1

RemoveToolsetFunction · 0.85

Tested by

no test coverage detected