MCPcopy Create free account
hub / github.com/github/gh-aw / TestDefaultsTargetEndpoints

Function TestDefaultsTargetEndpoints

pkg/cli/env_command_test.go:203–212  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

201}
202
203func TestDefaultsTargetEndpoints(t *testing.T) {
204 repoTarget := defaultsTarget{scope: defaultsScopeRepo, repoOwner: "github", repoName: "gh-aw"}
205 orgTarget := defaultsTarget{scope: defaultsScopeOrg, org: "github"}
206 entTarget := defaultsTarget{scope: defaultsScopeEnt, enterprise: "octo-ent"}
207
208 assert.Equal(t, "repos/github/gh-aw/actions/variables", repoTarget.variablesEndpoint())
209 assert.Equal(t, "orgs/github/actions/variables", orgTarget.variablesEndpoint())
210 assert.Equal(t, "enterprises/octo-ent/actions/variables", entTarget.variablesEndpoint())
211 assert.Equal(t, "repos/github/gh-aw/actions/variables/GH_AW_DEFAULT_MAX_TURNS", repoTarget.variableEndpoint("GH_AW_DEFAULT_MAX_TURNS"))
212}
213
214func TestDefaultsBuildUpdateChanges(t *testing.T) {
215 changes := defaultsBuildUpdateChanges(&defaultsFile{

Callers

nothing calls this directly

Calls 2

variablesEndpointMethod · 0.95
variableEndpointMethod · 0.95

Tested by

no test coverage detected