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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user