testutils

package
v0.0.0-...-aa13637 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FakePassword

func FakePassword() string

func GetRouter

func GetRouter() *gin.Engine

GetRouter return a router for test

func Setup

func Setup() (*gorm.DB, func(*gorm.DB))

Setup add hook to gorm:create and record all insertion, return a teardown function that clean all test record and remove the hook, refer from https://jarifibrahim.github.io/blog/test-cleanup-with-gorm-hooks/

func SignAccessToken

func SignAccessToken(user *models.User) string

func SignRefreshToken

func SignRefreshToken(user *models.User) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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