(t *testing.T, srv *Server)
| 225 | } |
| 226 | |
| 227 | func createWSForTest(t *testing.T, srv *Server) string { |
| 228 | t.Helper() |
| 229 | rr := doRequest(srv, "POST", "/api/v1/workspaces", map[string]string{"name": "Test"}) |
| 230 | if rr.Code != http.StatusCreated { |
| 231 | t.Fatalf("failed to create test workspace: %d %s", rr.Code, rr.Body.String()) |
| 232 | } |
| 233 | var ws models.Workspace |
| 234 | parseJSON(t, rr, &ws) |
| 235 | return ws.Slug |
| 236 | } |
| 237 | |
| 238 | func TestDocumentEndpoints(t *testing.T) { |
| 239 | srv := testServer(t) |
no test coverage detected