Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HTTP ¶ added in v1.0.2
type HTTP struct { // Request will assert if request was made with correct parameters Request expect.Request // Response mocks a fake response to avoid your test making real http request over the internet Response mock.Response }
HTTP asserts a http request
type SQL ¶ added in v1.0.2
type SQL struct { // DB database used to query the data to assert DB *sql.DB // Query that will run in the database Query call.Query // Result expects result in json that will be returned when the query run Result expect.Result }
SQL asserts a SQL query
func (*SQL) Assert ¶ added in v1.0.2
Assert checks if query returns the expected result Reference: https://kylewbanks.com/blog/query-result-to-map-in-golang
Click to show internal directories.
Click to hide internal directories.