Add backend unit tests

This commit is contained in:
Jamie Curnow
2023-07-25 11:59:02 +10:00
parent 72b071dbaa
commit b123ca4fd0
17 changed files with 399 additions and 283 deletions

View File

@ -35,7 +35,7 @@ func TestGetHealthz(t *testing.T) {
func TestNonExistent(t *testing.T) {
respRec := httptest.NewRecorder()
req, _ := http.NewRequest("GET", "/non-existent-endpoint", nil)
req, _ := http.NewRequest("GET", "/non-existent-endpoint.jpg", nil)
r.ServeHTTP(respRec, req)
assert.Equal(t, http.StatusNotFound, respRec.Code)