MCPcopy Index your code
hub / github.com/coder/coder / TestListPublicLowLevelScopes

Function TestListPublicLowLevelScopes

coderd/scopes_catalog_api_test.go:14–30  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

12)
13
14func TestListPublicLowLevelScopes(t *testing.T) {
15 t.Parallel()
16 client := coderdtest.New(t, nil)
17
18 res, err := client.Request(t.Context(), http.MethodGet, "/api/v2/auth/scopes", nil)
19 require.NoError(t, err)
20 defer res.Body.Close()
21 require.Equal(t, http.StatusOK, res.StatusCode)
22
23 var got struct {
24 External []string `json:"external"`
25 }
26 require.NoError(t, json.NewDecoder(res.Body).Decode(&got))
27
28 want := rbac.ExternalScopeNames()
29 require.Equal(t, want, got.External)
30}

Callers

nothing calls this directly

Calls 6

NewFunction · 0.92
ExternalScopeNamesFunction · 0.92
ContextMethod · 0.65
CloseMethod · 0.65
RequestMethod · 0.45
EqualMethod · 0.45

Tested by

no test coverage detected