Ejemplo n.º 1
0
// deleteTasks removes all tasks
func deleteTasks(rw http.ResponseWriter, req *http.Request, _ httprouter.Params) {
	task.DeleteAll()
	rw.WriteHeader(http.StatusNoContent)
}
Ejemplo n.º 2
0
func TestDeleteAllTasks(t *testing.T) {
	task.DeleteAll()
	if len(testdb.Tsks) != 0 {
		t.Error("Tasks were not deleted")
	}
}