This commit is contained in:
2025-08-23 17:57:39 -04:00
parent fe85abff04
commit 9ca9c53baf
6 changed files with 59 additions and 9 deletions

View File

@ -19,7 +19,8 @@ import (
func TestAuthenticationService_ValidateJWTToken(t *testing.T) {
config := NewMockConfig()
logger := zap.NewNop()
authService := services.NewAuthenticationService(config, logger)
permRepo := NewMockPermissionRepository()
authService := services.NewAuthenticationService(config, logger, permRepo)
userToken := &domain.UserToken{
AppID: "test-app",
@ -51,7 +52,8 @@ func TestAuthenticationService_ValidateJWTToken(t *testing.T) {
func TestAuthenticationService_GenerateJWTToken(t *testing.T) {
config := NewMockConfig()
logger := zap.NewNop()
authService := services.NewAuthenticationService(config, logger)
permRepo := NewMockPermissionRepository()
authService := services.NewAuthenticationService(config, logger, permRepo)
userToken := &domain.UserToken{
AppID: "test-app",
@ -76,7 +78,8 @@ func TestAuthenticationService_GenerateJWTToken(t *testing.T) {
func TestAuthenticationService_RefreshJWTToken(t *testing.T) {
config := NewMockConfig()
logger := zap.NewNop()
authService := services.NewAuthenticationService(config, logger)
permRepo := NewMockPermissionRepository()
authService := services.NewAuthenticationService(config, logger, permRepo)
userToken := &domain.UserToken{
AppID: "test-app",