tests

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: ISC Imports: 5 Imported by: 0

Documentation

Overview

Package tests provides definitions and functionality related to unit and integration tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

type Request struct {
	Name         string
	Method       string
	Endpoint     string
	Data         interface{}
	Headers      map[string]string
	ShouldStatus int
	ShouldReturn interface{}
}

Request holds information for a HTTP request

func (*Request) GetRequest

func (r *Request) GetRequest() (w *httptest.ResponseRecorder, c *gin.Context, err error)

GetRequest returns a ResponseRecorder and gin context according to the data set in the Request. String data is passed as is, all other data types are marshaled before.

Directories

Path Synopsis
Package mockups contains mockup objects and functions for tests.
Package mockups contains mockup objects and functions for tests.

Jump to

Keyboard shortcuts

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