package domain import "testing" func TestValidateUserCanAuthenticate(t *testing.T) { cases := []struct { status UserStatus want error }{ {UserStatusActive, nil}, {UserStatusPending, ErrUserNotVerified}, {UserStatusSuspended, ErrUserAccountLocked}, {UserStatusDeactivated, ErrUserAccountLocked}, } for _, tc := range cases { got := ValidateUserCanAuthenticate(tc.status) if got != tc.want { t.Fatalf("ValidateUserCanAuthenticate(%q)=%v, want %v", tc.status, got, tc.want) } } }