1
0
mirror of https://github.com/labstack/echo.git synced 2025-03-21 21:27:04 +02:00

Uses filepath.Join instead of hardcoded separator for static middleware test

This commit is contained in:
Nenad Lukic 2020-12-01 09:03:00 +01:00
parent 3206527cfe
commit 571661692f

View File

@ -3,6 +3,7 @@ package middleware
import (
"net/http"
"net/http/httptest"
"path/filepath"
"testing"
"github.com/labstack/echo/v4"
@ -89,5 +90,5 @@ func TestStatic(t *testing.T) {
e.ServeHTTP(rec, req)
assert.Equal(http.StatusOK, rec.Code)
assert.Contains(rec.Body.String(), "..\\_fixture\\_fixture")
assert.Contains(rec.Body.String(), filepath.Join("..", "_fixture", "_fixture"))
}