Documentation ¶
Index ¶
- func JSONAPIRequest(db *pg.DB, method, route string, jsonData *strings.Reader) *httptest.ResponseRecorder
- func JSONAPISetup() (*pg.DB, *controller.Handler, *migrate.Migrate)
- func JSONAPITeardown(db *pg.DB, m *migrate.Migrate)
- func JSONExpectResponseToEqual(recorder *httptest.ResponseRecorder, codeExpected int, JSONExpected string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONAPIRequest ¶
func JSONAPIRequest(db *pg.DB, method, route string, jsonData *strings.Reader) *httptest.ResponseRecorder
JSONAPIRequest is a helper for running controller tests
func JSONAPISetup ¶
JSONAPISetup is a helper for setting up controller tests
func JSONAPITeardown ¶
JSONAPITeardown is a helper for tearing down controller tests
func JSONExpectResponseToEqual ¶
func JSONExpectResponseToEqual(recorder *httptest.ResponseRecorder, codeExpected int, JSONExpected string)
JSONExpectResponseToEqual inspects and validated the JSON response
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.