Skip to content

Commit

Permalink
Uses filepath.Join instead of hardcoded separator for static middlewa…
Browse files Browse the repository at this point in the history
…re test
  • Loading branch information
lnenad committed Dec 1, 2020
1 parent 3206527 commit 5716616
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion middleware/static_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package middleware
import (
"net/http"
"net/http/httptest"
"path/filepath"
"testing"

"github.com/labstack/echo/v4"
Expand Down Expand Up @@ -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"))
}

0 comments on commit 5716616

Please sign in to comment.