Documentation
¶
Index ¶
- Variables
- func ParseID(id string) int
- func PerformAuthRequest(r http.Handler, method, path string, body interface{}, token string) *httptest.ResponseRecorder
- func PerformRequest(r http.Handler, method, path string, body interface{}) *httptest.ResponseRecorder
- func SetupTestAuthConfig(db *gorm.DB, service *services.Service) *auth.Config
- func SetupTestAuthService(db *gorm.DB, service *services.Service) *auth.AuthService
- func SetupTestDB(t *testing.T) *gorm.DB
- func SetupTestLicenser() interface{}
- func SetupTestNotificationService(db *gorm.DB) *services.NotificationService
- func SetupTestService(db *gorm.DB) *services.Service
Constants ¶
This section is empty.
Variables ¶
View Source
var EmptyFile embed.FS
EmptyFile is used for tests that require an embed.FS but don't need any files
Functions ¶
func ParseID ¶
ParseID converts a string ID to an integer. In tests, we often get string IDs from API responses but need to convert them to integers for database operations.
func PerformAuthRequest ¶
func PerformAuthRequest(r http.Handler, method, path string, body interface{}, token string) *httptest.ResponseRecorder
PerformAuthRequest performs an HTTP request with authentication token
func PerformRequest ¶
func PerformRequest(r http.Handler, method, path string, body interface{}) *httptest.ResponseRecorder
func SetupTestAuthConfig ¶
func SetupTestAuthService ¶
func SetupTestLicenser ¶
func SetupTestLicenser() interface{}
SetupTestLicenser is deprecated - licensing has been removed This function is kept for backward compatibility but does nothing
func SetupTestNotificationService ¶
func SetupTestNotificationService(db *gorm.DB) *services.NotificationService
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.