Browse Source

Fixes unit test when running in Windows

Manu Mtz-Almeida 10 năm trước cách đây
mục cha
commit
0d5dc25d39
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      routes_test.go

+ 2 - 2
routes_test.go

@@ -10,7 +10,7 @@ import (
 	"net/http"
 	"net/http"
 	"net/http/httptest"
 	"net/http/httptest"
 	"os"
 	"os"
-	"path"
+	"path/filepath"
 	"testing"
 	"testing"
 
 
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/assert"
@@ -161,7 +161,7 @@ func TestRouteStaticFile(t *testing.T) {
 	f.WriteString("Gin Web Framework")
 	f.WriteString("Gin Web Framework")
 	f.Close()
 	f.Close()
 
 
-	dir, filename := path.Split(f.Name())
+	dir, filename := filepath.Split(f.Name())
 
 
 	// SETUP gin
 	// SETUP gin
 	router := New()
 	router := New()