This commit is contained in:
ryan
2026-06-19 14:09:42 +08:00
parent 8506a03f1c
commit 19d476ed7f
338 changed files with 17810 additions and 1844 deletions
@@ -139,6 +139,11 @@ func TestRegisterCreatesAuthenticatedEncryptedUser(t *testing.T) {
dbConn, _, cleanup := testhelper.SetupTestEnvironment(t)
defer cleanup()
// Enable registration for this test
dbConn.Model(&model.SystemConfig{}).Where("key = ?", model.ConfigKeyRegistrationEnabled).Update("value", "true")
dbConn.Model(&model.SystemConfig{}).Where("key = ?", model.ConfigKeyPasswordRegisterEnabled).Update("value", "true")
_ = repository.InvalidateAllSystemConfigCaches(context.Background())
router := setupUserTestRouter(t)
payload := registerRequest{
Username: "newuser",