1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-19 10:57:05 +00:00

_examples/file-server update to test a party of file server

Former-commit-id: 2137bd00d256d57058bedd3b4a5868427cbdc64a
This commit is contained in:
Gerasimos (Makis) Maropoulos
2019-11-13 19:14:56 +02:00
parent 3d8e6a0317
commit 75dd5b759f
2 changed files with 10 additions and 7 deletions

View File

@@ -9,6 +9,8 @@ import (
"github.com/kataras/iris/v12/httptest"
)
const prefixURL = "/v1"
type resource string
func (r resource) contentType() string {
@@ -85,7 +87,7 @@ func TestFileServerBasic(t *testing.T) {
url := u.String()
contents := u.loadFromBase("./assets")
e.GET(url).Expect().
e.GET(prefixURL+url).Expect().
Status(httptest.StatusOK).
ContentType(u.contentType(), app.ConfigurationReadOnly().GetCharset()).
Body().Equal(contents)