mirror of
https://github.com/labstack/echo.git
synced 2024-12-24 20:14:31 +02:00
Using filepath to join path
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
commit
b8c3abde04
@ -78,8 +78,14 @@ func TestEchoStatic(t *testing.T) {
|
||||
|
||||
// Directory with index.html
|
||||
e.Static("/", "examples/website/public")
|
||||
c, _ = request(GET, "/", e)
|
||||
c, r := request(GET, "/", e)
|
||||
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) {
|
||||
|
1
examples/website/public/folder/index.html
Normal file
1
examples/website/public/folder/index.html
Normal file
@ -0,0 +1 @@
|
||||
sub directory
|
Loading…
Reference in New Issue
Block a user