Feat admin rbac migration (#1)
Co-authored-by: Jeffrey Smith <jasafpro@gmail.com> Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #1.
This commit is contained in:
@@ -40,7 +40,6 @@ func TestJWTGeneration(t *testing.T) {
|
||||
claims := Claims{
|
||||
UserID: "550e8400-e29b-41d4-a716-446655440000",
|
||||
Email: "test@example.com",
|
||||
Role: "user",
|
||||
RegisteredClaims: jwt.RegisteredClaims{
|
||||
IssuedAt: jwt.NewNumericDate(now),
|
||||
ExpiresAt: jwt.NewNumericDate(now.Add(15 * time.Minute)),
|
||||
@@ -75,9 +74,6 @@ func TestJWTGeneration(t *testing.T) {
|
||||
if parsed.Email != claims.Email {
|
||||
t.Errorf("Email mismatch: got %s, want %s", parsed.Email, claims.Email)
|
||||
}
|
||||
if parsed.Role != claims.Role {
|
||||
t.Errorf("Role mismatch: got %s, want %s", parsed.Role, claims.Role)
|
||||
}
|
||||
}
|
||||
|
||||
func TestJWTExpired(t *testing.T) {
|
||||
@@ -86,7 +82,6 @@ func TestJWTExpired(t *testing.T) {
|
||||
claims := Claims{
|
||||
UserID: "test-user",
|
||||
Email: "test@example.com",
|
||||
Role: "user",
|
||||
RegisteredClaims: jwt.RegisteredClaims{
|
||||
IssuedAt: jwt.NewNumericDate(time.Now().Add(-1 * time.Hour)),
|
||||
ExpiresAt: jwt.NewNumericDate(time.Now().Add(-30 * time.Minute)),
|
||||
@@ -109,7 +104,6 @@ func TestJWTWrongSecret(t *testing.T) {
|
||||
claims := Claims{
|
||||
UserID: "test-user",
|
||||
Email: "test@example.com",
|
||||
Role: "user",
|
||||
RegisteredClaims: jwt.RegisteredClaims{
|
||||
ExpiresAt: jwt.NewNumericDate(time.Now().Add(15 * time.Minute)),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user