Versions in this module Expand all Collapse all v1 v1.0.1 Nov 1, 2017 v1.0.0 Nov 1, 2017 Changes in this version + func CreateTestDatabase(dbPath string, migrationFunctions []func(*gorm.DB) error, ...) (*gorm.DB, error) + func CreateTestDatabasePostgres(dbHost, dbUser, dbName string, migrationFunctions []func(*gorm.DB) error, ...) (*gorm.DB, error) + func TestEmptyResponse(t *testing.T, w *httptest.ResponseRecorder) + func TestErrorExpectedResponse(t *testing.T, router *mux.Router, method, url string, data io.Reader, ...) + func TestGetErrorExpectedResponse(t *testing.T, router *mux.Router, url, accessToken, msg string, code int, ...) + func TestListValidResponse(t *testing.T, router *mux.Router, path, entity, accessToken string, ...) + func TestListValidResponseWithParams(t *testing.T, router *mux.Router, path, entity, accessToken string, ...) + func TestPostErrorExpectedResponse(t *testing.T, router *mux.Router, url string, data io.Reader, ...) + func TestPutErrorExpectedResponse(t *testing.T, router *mux.Router, url string, data io.Reader, ...) + func TestResponseBody(t *testing.T, w *httptest.ResponseRecorder, expected string) + func TestResponseForError(t *testing.T, w *httptest.ResponseRecorder, msg string, code int) + func TestResponseObject(t *testing.T, w *httptest.ResponseRecorder, expected interface{}, code int)