Returning nil on delete, fix species test

This commit is contained in:
Matthew Dillon 2015-01-15 17:01:07 -09:00
parent eb7c778be8
commit a669cf8d93
3 changed files with 3 additions and 2 deletions

View file

@ -90,5 +90,5 @@ func serveDeleteGenus(w http.ResponseWriter, r *http.Request) error {
w.WriteHeader(http.StatusOK)
}
return writeJSON(w, &models.Genus{})
return writeJSON(w, nil)
}

View file

@ -88,7 +88,7 @@ func serveDeleteSpecies(w http.ResponseWriter, r *http.Request) error {
w.WriteHeader(http.StatusOK)
}
return writeJSON(w, &models.Species{})
return writeJSON(w, nil)
}
func serveSubrouterSpeciesList(w http.ResponseWriter, r *http.Request) error {

View file

@ -156,6 +156,7 @@ func TestSpeciesService_Delete(t *testing.T) {
mux.HandleFunc(urlPath(t, router.DeleteSpecies, map[string]string{"Id": "1"}), func(w http.ResponseWriter, r *http.Request) {
called = true
testMethod(t, r, "DELETE")
testBody(t, r, "")
w.WriteHeader(http.StatusOK)
writeJSON(w, want)