test media del

This commit is contained in:
Bel LaPointe
2022-02-08 11:27:28 -07:00
parent 57f24b2f33
commit 3cc18ba4d5
2 changed files with 13 additions and 0 deletions

View File

@@ -14,6 +14,7 @@ func TestServerRoutes(t *testing.T) {
}
ensureAndWrite(server.diskMediaPath("id"), []byte("hi"))
ensureAndWrite(server.diskMediaPath("delid"), []byte("hi"))
cases := map[string]struct {
path string
@@ -35,6 +36,10 @@ func TestServerRoutes(t *testing.T) {
path: "/api/v0/media",
method: http.MethodPost,
},
"v0: media id: del": {
path: "/api/v0/media/delid",
method: http.MethodDelete,
},
"v0: media id: get": {
path: "/api/v0/media/id",
method: http.MethodGet,