replace static status definition by const

This commit is contained in:
venture
2026-11-14 09:57:52 +01:00
parent 276a9fe320
commit f16363cb60
10 changed files with 65 additions and 48 deletions
+3 -3
View File
@@ -149,8 +149,8 @@ func TestGuestSession(t *testing.T) {
if authenticated.Account.Login != "jean" {
t.Fatalf("login = %q, attendu jean", authenticated.Account.Login)
}
if authenticated.Account.State != "active" {
t.Fatalf("state = %q, attendu active", authenticated.Account.State)
if authenticated.Account.State != AccountStateActive {
t.Fatalf("state = %q, attendu %q", authenticated.Account.State, AccountStateActive)
}
}
@@ -161,7 +161,7 @@ func TestCreateSessionRejectsInactivePrincipal(t *testing.T) {
created := mustCreateUser(t, service, "alice", "correct horse battery staple", identity.RoleMember)
_, err := service.db.WriteQueries.UpdatePrincipalStatus(ctx, database.UpdatePrincipalStatusParams{
Status: "disabled",
Status: identity.StatusDisabled,
ID: created.Principal.ID,
})
if err != nil {