(t *testing.T, v interface{})
| 42 | } |
| 43 | |
| 44 | func sendJSON(t *testing.T, v interface{}) http.HandlerFunc { |
| 45 | return func(w http.ResponseWriter, r *http.Request) { |
| 46 | w.Header().Set("Content-Type", "application/json; charset=utf-8") |
| 47 | if err := json.NewEncoder(w).Encode(v); err != nil { |
| 48 | t.Fatal(err) |
| 49 | } |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | func readJSON(t *testing.T, ptr interface{}, expected interface{}) http.HandlerFunc { |
| 54 | return func(w http.ResponseWriter, r *http.Request) { |
no test coverage detected
searching dependent graphs…