replace static status definition by const
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user