helpers

package
v0.0.0-...-ee7fb9c Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CLIENT_IP string = "127.0.0.2"
	OLD_IP    string = "127.0.0.3"

	VALID_NAME_1  string = "Jane Doe"
	VALID_EMAIL_1 string = "email-one@test.co"
	VALID_PHONE_1 string = "+12125551234"
	VALID_PW_1    string = "7h3Val!dPA5SWoRD"

	VALID_NAME_2  string = "John Doe"
	VALID_EMAIL_2 string = "email-two@test.co"
	VALID_PHONE_2 string = "+12125556789"
	VALID_PW_2    string = "7h3Val@dPA5SWoRD"
)

Variables

Functions

func AssertErrorResponseBody

func AssertErrorResponseBody(
	t *testing.T, resp *http.Response, expected *utils.ErrorResponseBody,
)

func AssertLog

func AssertLog(t *testing.T, expected *models.Log, actual *models.Log)

func CountClientSessions

func CountClientSessions(t *testing.T, db *gorm.DB, sessionCount *int64)

func CountEmailTokens

func CountEmailTokens(t *testing.T, db *gorm.DB, emailTokenCount *int64)

func CountLogs

func CountLogs(t *testing.T, db *gorm.DB, logCount *int64)

func CountMFATokens

func CountMFATokens(t *testing.T, db *gorm.DB, mfaTokenCount *int64)

func CountUsers

func CountUsers(t *testing.T, db *gorm.DB, userCount *int64)

func NewSlug

func NewSlug(t *testing.T) string

func QueryTestClientSessionLatest

func QueryTestClientSessionLatest(t *testing.T, db *gorm.DB, session *models.ClientSession)

func QueryTestEmailTokenLatest

func QueryTestEmailTokenLatest(
	t *testing.T, db *gorm.DB, emailToken *models.EmailVerificationToken,
)

func QueryTestLogLatest

func QueryTestLogLatest(t *testing.T, db *gorm.DB, log *models.Log)

func QueryTestMFATokenLatest

func QueryTestMFATokenLatest(t *testing.T, db *gorm.DB, mfaToken *models.MFAToken)

func QueryTestUserByEmail

func QueryTestUserByEmail(t *testing.T, db *gorm.DB, user *models.User, email string)

func QueryTestUserBySlug

func QueryTestUserBySlug(t *testing.T, db *gorm.DB, user *models.User, slug string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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