Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var TestClient = TestServer.Client()
View Source
var TestServer = go_test_utils.NewTestServer(go_test_utils.Routes{ "/api/v1/session": func(w *http.ResponseWriter, r *http.Request) { (*w).Write([]byte("{\"token\": \"mock\"}")) }, "/api/v1/session/authenticate": func(w *http.ResponseWriter, r *http.Request) { (*w).Write([]byte("{\"authenticated\": \"true\"}")) }, "/api/v1/settings/purge": func(w *http.ResponseWriter, r *http.Request) { (*w).WriteHeader(500) }, "/api/v1/mock": func(w *http.ResponseWriter, r *http.Request) { (*w).Write([]byte("{\"mocked\": \"true\"}")) }, })
Functions ¶
func AssertJsonStringEquals ¶ added in v0.90.0
AssertJsonStringEquals checks if two json strings are equal when minified
func AssertLoggingEqualsRegex ¶
func AssertLoggingEqualsRegex(log bytes.Buffer, want []LoggingRegexAssertion) (bool, []string)
Types ¶
type LoggingMessage ¶
type LoggingRegexAssertion ¶
func (LoggingRegexAssertion) String ¶
func (assertion LoggingRegexAssertion) String() string
type LoggingRegexAssertions ¶
type LoggingRegexAssertions []LoggingRegexAssertion
func (LoggingRegexAssertions) String ¶
func (assertions LoggingRegexAssertions) String() string
Click to show internal directories.
Click to hide internal directories.