fix: update JwtService to handle default expiration and add tests for token generation
All checks were successful
Build And Publish Production Image / Build And Publish Production Image (push) Successful in 39s

This commit is contained in:
2026-03-28 03:40:03 -03:00
parent 8f508034d5
commit 2e2e75fe87
5 changed files with 34 additions and 4 deletions

View File

@@ -40,7 +40,7 @@ class AuthServiceTest {
fun should_returnValidClaims_when_jwtTokenParsed() {
val realJwtService = JwtService(
secret = "test-secret-key-for-testing-only-must-be-at-least-32-characters",
expirationMs = 86400000L
expirationMsRaw = "86400000"
)
val token = realJwtService.generateToken()
@@ -51,7 +51,7 @@ class AuthServiceTest {
fun should_returnFalse_when_expiredTokenValidated() {
val realJwtService = JwtService(
secret = "test-secret-key-for-testing-only-must-be-at-least-32-characters",
expirationMs = 1L
expirationMsRaw = "1"
)
val token = realJwtService.generateToken()