(t *testing.T)
| 29 | } |
| 30 | |
| 31 | func TestGetToolScopeInfo(t *testing.T) { |
| 32 | // Set up test scope map |
| 33 | SetGlobalToolScopeMap(ToolScopeMap{ |
| 34 | "search_orgs": &ToolScopeInfo{ |
| 35 | RequiredScopes: []string{"read:org"}, |
| 36 | AcceptedScopes: []string{"read:org", "write:org", "admin:org"}, |
| 37 | }, |
| 38 | }) |
| 39 | |
| 40 | info, err := GetToolScopeInfo("search_orgs") |
| 41 | require.NoError(t, err) |
| 42 | require.NotNil(t, info) |
| 43 | |
| 44 | // Non-existent tool should return nil |
| 45 | info, err = GetToolScopeInfo("nonexistent_tool") |
| 46 | require.NoError(t, err) |
| 47 | assert.Nil(t, info) |
| 48 | } |
| 49 | |
| 50 | func TestToolScopeInfo_HasAcceptedScope(t *testing.T) { |
| 51 | testCases := []struct { |
nothing calls this directly
no test coverage detected