MCPcopy
hub / github.com/henrygd/beszel / TestUserCreation

Function TestUserCreation

internal/hub/collections_test.go:301–309  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

299}
300
301func TestUserCreation(t *testing.T) {
302 t.Setenv("USER_CREATION", "true")
303 hub, _ := beszelTests.NewTestHub(t.TempDir())
304 defer hub.Cleanup()
305
306 usersCollection, err := hub.FindCollectionByNameOrId("users")
307 assert.NoError(t, err)
308 assert.Equal(t, "@request.context = 'oauth2'", *usersCollection.CreateRule)
309}
310
311func TestMFAOtp(t *testing.T) {
312 t.Setenv("MFA_OTP", "true")

Callers

nothing calls this directly

Calls 1

CleanupMethod · 0.95

Tested by

no test coverage detected