mirror of
https://github.com/labstack/echo.git
synced 2025-07-15 01:34:53 +02:00
Uses filepath.Join instead of hardcoded separator for static middleware test
This commit is contained in:
@ -3,6 +3,7 @@ package middleware
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/labstack/echo/v4"
|
"github.com/labstack/echo/v4"
|
||||||
@ -89,5 +90,5 @@ func TestStatic(t *testing.T) {
|
|||||||
e.ServeHTTP(rec, req)
|
e.ServeHTTP(rec, req)
|
||||||
|
|
||||||
assert.Equal(http.StatusOK, rec.Code)
|
assert.Equal(http.StatusOK, rec.Code)
|
||||||
assert.Contains(rec.Body.String(), "..\\_fixture\\_fixture")
|
assert.Contains(rec.Body.String(), filepath.Join("..", "_fixture", "_fixture"))
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user