clean: remove now unused helpers

This commit is contained in:
2025-11-14 06:50:14 +01:00
parent 8b01f79c8e
commit ba17fa1b5a

View File

@@ -11,14 +11,15 @@ import (
"strings" "strings"
"testing" "testing"
"golang.org/x/crypto/bcrypt"
"gorm.io/gorm"
"goyco/internal/config" "goyco/internal/config"
"goyco/internal/database" "goyco/internal/database"
"goyco/internal/middleware" "goyco/internal/middleware"
"goyco/internal/repositories" "goyco/internal/repositories"
"goyco/internal/services" "goyco/internal/services"
"goyco/internal/testutils" "goyco/internal/testutils"
"golang.org/x/crypto/bcrypt"
"gorm.io/gorm"
) )
func newAuthHandler(repo repositories.UserRepository) *AuthHandler { func newAuthHandler(repo repositories.UserRepository) *AuthHandler {
@@ -235,26 +236,6 @@ func (m *mockRefreshTokenRepository) CountByUserID(userID uint) (int64, error) {
return 0, nil return 0, nil
} }
func newMockAuthService() *mockAuthService {
return &mockAuthService{}
}
func newMockAuthServiceWithLogin(fn func(string, string) (*services.AuthResult, error)) *mockAuthService {
return &mockAuthService{loginFunc: fn}
}
func newMockAuthServiceWithRegister(fn func(string, string, string) (*services.RegistrationResult, error)) *mockAuthService {
return &mockAuthService{registerFunc: fn}
}
func newMockAuthServiceWithRefreshToken(fn func(string) (*services.AuthResult, error)) *mockAuthService {
return &mockAuthService{refreshAccessTokenFunc: fn}
}
func newMockAuthServiceWithRevokeToken(fn func(string) error) *mockAuthService {
return &mockAuthService{revokeRefreshTokenFunc: fn}
}
func newMockAuthHandler(repo repositories.UserRepository, mockService *mockAuthService) *AuthHandler { func newMockAuthHandler(repo repositories.UserRepository, mockService *mockAuthService) *AuthHandler {
return &AuthHandler{ return &AuthHandler{
authService: mockService, authService: mockService,