1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-26 20:54:00 +02:00

Using filepath to join path

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2015-06-19 18:04:53 -07:00
commit b8c3abde04
2 changed files with 8 additions and 1 deletions

View File

@ -78,8 +78,14 @@ func TestEchoStatic(t *testing.T) {
// Directory with index.html // Directory with index.html
e.Static("/", "examples/website/public") e.Static("/", "examples/website/public")
c, _ = request(GET, "/", e) c, r := request(GET, "/", e)
assert.Equal(t, http.StatusOK, c) assert.Equal(t, http.StatusOK, c)
assert.Equal(t, true, strings.HasPrefix(r, "<!doctype html>"))
// Sub-directory with index.html
c, r = request(GET, "/folder", e)
assert.Equal(t, http.StatusOK, c)
assert.Equal(t, "sub directory", r)
} }
func TestEchoMiddleware(t *testing.T) { func TestEchoMiddleware(t *testing.T) {

View File

@ -0,0 +1 @@
sub directory