Documentation ¶
Index ¶
- func BodyEquals(t assert.TestingT, obj interface{}, recorder *httptest.ResponseRecorder)
- func GetProjectDir() string
- func JSONEquals(t assert.TestingT, obj interface{}, expected string)
- func Tokens(tokens ...string) func() string
- func UnreadableReader() io.Reader
- func WithUser(ctx *gin.Context, userID uint)
- func WithWd(chDir string, f func(origWd string))
- type TmpDir
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BodyEquals ¶
func BodyEquals(t assert.TestingT, obj interface{}, recorder *httptest.ResponseRecorder)
BodyEquals asserts the content from the response recorder with the encoded json of the provided instance.
func GetProjectDir ¶
func GetProjectDir() string
GetProjectDir returns the correct absolute path of this project.
func JSONEquals ¶
JSONEquals asserts the content of the string with the encoded json of the provided instance.
func Tokens ¶
Tokens returns a token generation function with takes a series of tokens and output them in order.
func UnreadableReader ¶
UnreadableReader returns an unreadable reader, used to mock IO issues.
Types ¶
Click to show internal directories.
Click to hide internal directories.