(t *testing.T)
| 299 | } |
| 300 | |
| 301 | func 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 | |
| 311 | func TestMFAOtp(t *testing.T) { |
| 312 | t.Setenv("MFA_OTP", "true") |