testguard

package
v0.0.0-...-6907ca9 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessTest

func AccessTest(t *testing.T, g *guard.Guard, testCases []AccessTestCase)

AccessTest checks if the auth are correctly set

func InvalidParams

func InvalidParams(t *testing.T, g *guard.Guard, testCases []InvalidParamsTestCase)

InvalidParams checks if the params are correctly failing

Types

type AccessTestCase

type AccessTestCase struct {
	Description string
	User        *auth.User
	ErrCode     int // <= 0 for no error
}

AccessTestCase represents the data needed to test params

type InvalidParamsTestCase

type InvalidParamsTestCase struct {
	Description string
	MsgMatch    string
	FieldName   string
	Sources     map[string]url.Values
	FileHolder  formfile.FileHolder
}

InvalidParamsTestCase represents the data needed to test params

Jump to

Keyboard shortcuts

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