testhelpers

package
v0.0.0-...-4b982e4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 8, 2025 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckForUserIDIssues

func CheckForUserIDIssues(tcName string, userID uuid.UUID, c *gin.Context)

func CheckHTTPResponse

func CheckHTTPResponse(t *testing.T, w *httptest.ResponseRecorder, expErr string, expStatus int, expResp, actualResponse map[string]interface{})

func ConvertResponseFloatToInt

func ConvertResponseFloatToInt(actualResponse map[string]interface{}) map[string]interface{}

func CreateTestingSchema

func CreateTestingSchema(t *testing.T, db *sql.DB)

func GetEmailFromBody

func GetEmailFromBody(reqBody string) string

func GetPasswordFromBody

func GetPasswordFromBody(reqBody string) string

func IsTxFound

func IsTxFound(t *testing.T, tc testmodels.BaseHTTPTestCase, txID uuid.UUID, env *testmodels.TestEnv)

func ProcessResponse

func ProcessResponse(w *httptest.ResponseRecorder, t *testing.T) map[string]interface{}

func SeedCreateTxTestData

func SeedCreateTxTestData(t *testing.T, db *sql.DB, userQ database.UserQuerier, userID uuid.UUID)

func SeedMultipleTestTransactions

func SeedMultipleTestTransactions[T interfaces.TxPageRow](t *testing.T, txQ database.TransactionQuerier, rows []T)

func SeedTestCategories

func SeedTestCategories(t *testing.T, db *sql.DB)

func SeedTestDeviceInfo

func SeedTestDeviceInfo(t *testing.T, deviceQ database.DeviceQuerier, userID uuid.UUID)

func SeedTestTransaction

func SeedTestTransaction(t *testing.T, txQ database.TransactionQuerier, userID, txID uuid.UUID, req *models.NewTxRequest)

func SeedTestUser

func SeedTestUser(t *testing.T, userQ database.UserQuerier, userID uuid.UUID, requiresHash bool)

func SetupTestEnv

func SetupTestEnv(t *testing.T) *testmodels.TestEnv

func StrPtr

func StrPtr(s string) *string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL