Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateServerTester

func CreateServerTester(t *testing.T, hostname string, port string, jar *cookiejar.Jar) func(method string, url string, header Header, payload string, expectedStatus int, expectedBody string) string

CreateServerTester wraps DoRequestOnServer to factorize t, port and jar

func DoRequestOnHandler

func DoRequestOnHandler(t *testing.T, router http.Handler, method string, route string, header Header, payload string, expectedStatus int, expectedBody string) string

DoRequestOnHandler does a request on a router (or handler) and check the response

func DoRequestOnServer

func DoRequestOnServer(t *testing.T, hostname string, port string, jar *cookiejar.Jar, method string, testURL string, header Header, payload string, expectedStatus int, expectedBody string) string

DoRequestOnServer does a request on listening server

Types

type Header struct {
	Key   string
	Value string
}

Header is a http header

Source Files