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

Function TestCreateFirstUser_Entitlements_Trial

enterprise/coderd/users_test.go:231–247  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

229}
230
231func TestCreateFirstUser_Entitlements_Trial(t *testing.T) {
232 t.Parallel()
233
234 adminClient, _ := coderdenttest.New(t, &coderdenttest.Options{
235 LicenseOptions: &coderdenttest.LicenseOptions{
236 Trial: true,
237 },
238 })
239
240 ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitShort)
241 defer cancel()
242
243 //nolint:gocritic // we need the first user so admin
244 entitlements, err := adminClient.Entitlements(ctx)
245 require.NoError(t, err)
246 require.True(t, entitlements.Trial, "Trial license should be immediately active.")
247}
248
249// TestAssignCustomOrgRoles verifies an organization admin (not just an owner) can create
250// a custom role and assign it to an organization user.

Callers

nothing calls this directly

Calls 2

NewFunction · 0.92
EntitlementsMethod · 0.80

Tested by

no test coverage detected