Documentation
¶
Overview ¶
Package testutils provides utilities for testing the application
Index ¶
- func CreateTestUser(t *testing.T, database *db.DB, email string, isAdmin bool) *db.User
- func GenerateTestToken(userID uint, isAdmin bool, jwtSecret string) (string, error)
- func SetupTestConfig(t *testing.T) *config.Config
- func SetupTestDB(t *testing.T) *db.DB
- func SetupTestEmailService(t *testing.T) *email.Service
- func SetupTestScheduler(t *testing.T) *scheduler.Scheduler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTestUser ¶
CreateTestUser creates a test user in the database
func GenerateTestToken ¶
GenerateTestToken generates a JWT token for testing
func SetupTestConfig ¶
SetupTestConfig creates a test configuration
func SetupTestDB ¶
SetupTestDB creates an in-memory SQLite database for testing
func SetupTestEmailService ¶
SetupTestEmailService creates a mock email service for testing
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.