(t *testing.T)
| 109 | } |
| 110 | |
| 111 | func TestDeleteHook(t *testing.T) { |
| 112 | router, _, err := setupRouter(t) |
| 113 | if err != nil { |
| 114 | t.Fatalf("Failed to setup router: %v", err) |
| 115 | } |
| 116 | |
| 117 | t.Run("Delete non-existent hook", func(t *testing.T) { |
| 118 | req := httptest.NewRequest("DELETE", "/hooks/hk_nonexistent", nil) |
| 119 | resp := httptest.NewRecorder() |
| 120 | router.ServeHTTP(resp, req) |
| 121 | assert.Equal(t, http.StatusBadRequest, resp.Code) |
| 122 | }) |
| 123 | } |
nothing calls this directly
no test coverage detected