test get media
parent
7223cb6af9
commit
fd74e730ec
|
|
@ -2,8 +2,11 @@ package main
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"os"
|
||||
"path"
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
|
@ -13,6 +16,9 @@ func TestServerRoutes(t *testing.T) {
|
|||
t.Fatal(err)
|
||||
}
|
||||
|
||||
os.MkdirAll(path.Join(server.root, "media"), os.ModePerm)
|
||||
ioutil.WriteFile(path.Join(server.root, "media", "id"), []byte("hi"), os.ModePerm)
|
||||
|
||||
cases := map[string]struct {
|
||||
path string
|
||||
method string
|
||||
|
|
|
|||
Loading…
Reference in New Issue