test

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateControllerContext

func CreateControllerContext() (*gin.Context, *httptest.ResponseRecorder)

CreateControllerContext creates a Context for mocking HTTP requests.

func MockJsonPost

func MockJsonPost(c *gin.Context, content interface{})

MockJsonPost method to mock HTTP request bodies. Code from https://stackoverflow.com/questions/57733801/how-to-set-mock-gin-context-for-bindjson

Types

This section is empty.

Jump to

Keyboard shortcuts

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