Versions in this module Expand all Collapse all v0 v0.1.0 Oct 25, 2025 Changes in this version + type TestApp struct + App *fiber.App + DB *gorm.DB + Server *httptest.Server + func NewTestApp(t *testing.T, config *TestConfig) *TestApp + func (ta *TestApp) Close() + func (ta *TestApp) Delete(t *testing.T, path string, headers map[string]string) *TestResponse + func (ta *TestApp) Get(t *testing.T, path string) *TestResponse + func (ta *TestApp) Post(t *testing.T, path string, body interface{}, headers map[string]string) *TestResponse + func (ta *TestApp) Put(t *testing.T, path string, body interface{}, headers map[string]string) *TestResponse + func (ta *TestApp) Request(t *testing.T, method, path string, body interface{}, headers map[string]string) *TestResponse + type TestAssertion struct + func NewTestAssertion(t *testing.T) *TestAssertion + func (ta *TestAssertion) AssertEmpty(value interface{}, msg ...string) + func (ta *TestAssertion) AssertError(err error, msg ...string) + func (ta *TestAssertion) AssertNoError(err error, msg ...string) + func (ta *TestAssertion) AssertNotEmpty(value interface{}, msg ...string) + type TestConfig struct + DatabaseDSN string + DatabaseDriver string + Debug bool + Port int + func DefaultTestConfig() *TestConfig + type TestDataProvider struct + Data map[string]interface{} + func NewTestDataProvider() *TestDataProvider + func (tdp *TestDataProvider) Clear() + func (tdp *TestDataProvider) Get(key string) interface{} + func (tdp *TestDataProvider) GetBool(key string) bool + func (tdp *TestDataProvider) GetInt(key string) int + func (tdp *TestDataProvider) GetString(key string) string + func (tdp *TestDataProvider) Set(key string, value interface{}) + type TestEnvironment struct + Files []*TestFile + TempDir string + func NewTestEnvironment(t *testing.T) *TestEnvironment + func (te *TestEnvironment) AddFile(t *testing.T, name, content string) *TestFile + func (te *TestEnvironment) Cleanup(t *testing.T) + func (te *TestEnvironment) GetPath(name string) string + type TestFactory struct + DB *gorm.DB + func NewTestFactory(db *gorm.DB) *TestFactory + func (tf *TestFactory) CleanupDatabase() + func (tf *TestFactory) CreatePermission(overrides ...map[string]interface{}) *TestPermission + func (tf *TestFactory) CreatePost(userID uint, overrides ...map[string]interface{}) *TestPost + func (tf *TestFactory) CreateRole(overrides ...map[string]interface{}) *TestRole + func (tf *TestFactory) CreateUser(overrides ...map[string]interface{}) *TestUser + type TestFile struct + Content []byte + Name string + Path string + func CreateTestFile(t *testing.T, name, content string) *TestFile + func (tf *TestFile) Remove(t *testing.T) + func (tf *TestFile) Write(t *testing.T) + type TestHelper struct + App *fiber.App + DB *gorm.DB + Factory *TestFactory + func NewTestHelper(t *testing.T) *TestHelper + func (th *TestHelper) Cleanup() + func (th *TestHelper) Request(t *testing.T, method, path string, body interface{}, headers map[string]string) *TestResponse + func (th *TestHelper) SetupTestRoutes() + type TestLogger struct + Messages []string + func NewTestLogger() *TestLogger + func (tl *TestLogger) AssertLogged(t *testing.T, expected string) + func (tl *TestLogger) Clear() + func (tl *TestLogger) GetMessages() []string + func (tl *TestLogger) Log(msg string) + type TestPermission struct + CreatedAt time.Time + Description string + ID uint + Name string + UpdatedAt time.Time + type TestPost struct + Content string + CreatedAt time.Time + ID uint + Title string + UpdatedAt time.Time + User TestUser + UserID uint + type TestResponse struct + Body []byte + Headers http.Header + StatusCode int + func (tr *TestResponse) AssertContains(t *testing.T, expected string) + func (tr *TestResponse) AssertHeader(t *testing.T, key, expected string) + func (tr *TestResponse) AssertJSON(t *testing.T, expected interface{}) + func (tr *TestResponse) AssertStatus(t *testing.T, expected int) + func (tr *TestResponse) GetJSON(t *testing.T, target interface{}) + type TestRole struct + CreatedAt time.Time + DeletedAt gorm.DeletedAt + Description string + ID uint + Name string + UpdatedAt time.Time + type TestTimeout struct + Duration time.Duration + func NewTestTimeout(duration time.Duration) *TestTimeout + func (tt *TestTimeout) WithTimeout(t *testing.T, fn func()) + type TestUser struct + CreatedAt time.Time + Email string + ID uint + Name string + Password string + UpdatedAt time.Time