spec

package
v0.0.0-...-04789b0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(t *testing.T, testingSuite TestingSuite)

Run a testing suite

Types

type ControllerSuite

type ControllerSuite struct {
	Suite
	Server http.Handler
}

ControllerSuite mock controller requests

func (*ControllerSuite) DELETE

func (suite *ControllerSuite) DELETE(path, body string) *httptest.ResponseRecorder

DELETE on Server

func (*ControllerSuite) GET

func (suite *ControllerSuite) GET(path, body string) *httptest.ResponseRecorder

GET on Server

func (*ControllerSuite) MockRequest

func (suite *ControllerSuite) MockRequest(method, path, body string) *httptest.ResponseRecorder

MockRequest on Server

func (*ControllerSuite) PATCH

func (suite *ControllerSuite) PATCH(path, body string) *httptest.ResponseRecorder

PATCH on Server

func (*ControllerSuite) POST

func (suite *ControllerSuite) POST(path, body string) *httptest.ResponseRecorder

POST on Server

func (*ControllerSuite) PUT

func (suite *ControllerSuite) PUT(path, body string) *httptest.ResponseRecorder

PUT on Server

type Suite

type Suite struct {
	suite.Suite
	Expect *assert.Assertions
}

Suite mocking expect object

func (*Suite) SetupTest

func (suite *Suite) SetupTest()

SetupTest add Expect in suite structure

type TestingSuite

type TestingSuite suite.TestingSuite

TestingSuite mock suite testify package

Jump to

Keyboard shortcuts

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