mirror of https://github.com/gin-gonic/gin.git
Replaced deprecated ServeFiles
This commit is contained in:
parent
8933874582
commit
89b4c6e0d1
|
@ -334,7 +334,7 @@ func TestHandleStaticFile(t *testing.T) {
|
||||||
w := httptest.NewRecorder()
|
w := httptest.NewRecorder()
|
||||||
|
|
||||||
r := Default()
|
r := Default()
|
||||||
r.ServeFiles("/*filepath", http.Dir("./"))
|
r.Static("./", testRoot)
|
||||||
|
|
||||||
r.ServeHTTP(w, req)
|
r.ServeHTTP(w, req)
|
||||||
|
|
||||||
|
@ -359,7 +359,7 @@ func TestHandleStaticDir(t *testing.T) {
|
||||||
w := httptest.NewRecorder()
|
w := httptest.NewRecorder()
|
||||||
|
|
||||||
r := Default()
|
r := Default()
|
||||||
r.ServeFiles("/*filepath", http.Dir("./"))
|
r.Static("/", "./")
|
||||||
|
|
||||||
r.ServeHTTP(w, req)
|
r.ServeHTTP(w, req)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue