Documentation ¶
Index ¶
- func AssertErrorMessage(t *testing.T, res *http.Response, expectedMessage string)
- func AssertFailedFiberGET(t *testing.T, app *fiber.App, route string, status int, message string)
- func AssertFailedGET(t *testing.T, route string, expectedStatus int, expectedMessage string)
- func AssertFiberGET(t *testing.T, app *fiber.App, route string, status int, ...)
- func AssertHeaderPages(t *testing.T, res *http.Response, expectedPages int)
- func AssertJSONBattle(t *testing.T, res *http.Response, expectedBattle battles.Battle)
- func AssertJSONBattles(t *testing.T, res *http.Response, expectedBattles []battles.Battle)
- func AssertJSONCommander(t *testing.T, res *http.Response, expectedCommander commanders.Commander)
- func AssertJSONCommanders(t *testing.T, res *http.Response, expectedCommanders []commanders.Commander)
- func AssertJSONFaction(t *testing.T, res *http.Response, expectedFaction factions.Faction)
- func AssertJSONFactions(t *testing.T, res *http.Response, expectedFactions []factions.Faction)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertErrorMessage ¶
AssertErrorMessage asserts that the given *http.Response contains the specified error message
func AssertFailedFiberGET ¶
AssertFailedFiberGET asserts that the specified route, when handled by the given *fiber.App, renders the specified fiber.Error
func AssertFailedGET ¶
AssertFailedGET asserts that issuing a GET request to the specified route renders the given status and error message
func AssertFiberGET ¶
func AssertFiberGET(t *testing.T, app *fiber.App, route string, status int, assertResponse func(*http.Response))
AssertFiberGET asserts that the specified route, when handled by the given *fiber.App, renders the specified status and satisfies the given assertResponse function
func AssertHeaderPages ¶
AssertHeaderPages asserts that the given *http.Response has the expected "x-pages" header value
func AssertJSONBattle ¶
AssertJSONBattle asserts that the given *http.Response contains the specified JSON-serialized battles.Battle
func AssertJSONBattles ¶
AssertJSONBattles is like AssertJSONBattle, but for a slice of battles.Battle
func AssertJSONCommander ¶
AssertJSONCommander asserts that the given *http.Response contains the specified JSON-serialized commanders.Commander
func AssertJSONCommanders ¶
func AssertJSONCommanders(t *testing.T, res *http.Response, expectedCommanders []commanders.Commander)
AssertJSONCommanders is like AssertJSONCommander, but for a slice of commanders.Commander
func AssertJSONFaction ¶
AssertJSONFaction asserts that the given *http.Response contains the specified JSON-serialized factions.Faction
Types ¶
This section is empty.