Skip to content

Commit 5716616

Browse files
committed
Uses filepath.Join instead of hardcoded separator for static middleware test
1 parent 3206527 commit 5716616

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

middleware/static_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package middleware
33
import (
44
"net/http"
55
"net/http/httptest"
6+
"path/filepath"
67
"testing"
78

89
"github.com/labstack/echo/v4"
@@ -89,5 +90,5 @@ func TestStatic(t *testing.T) {
8990
e.ServeHTTP(rec, req)
9091

9192
assert.Equal(http.StatusOK, rec.Code)
92-
assert.Contains(rec.Body.String(), "..\\_fixture\\_fixture")
93+
assert.Contains(rec.Body.String(), filepath.Join("..", "_fixture", "_fixture"))
9394
}

0 commit comments

Comments
 (0)