浏览代码

Replaced deprecated ServeFiles

Sasha Myasoedov 11 年之前
父节点
当前提交
89b4c6e0d1
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      gin_test.go

+ 2 - 2
gin_test.go

@@ -334,7 +334,7 @@ func TestHandleStaticFile(t *testing.T) {
 	w := httptest.NewRecorder()
 
 	r := Default()
-	r.ServeFiles("/*filepath", http.Dir("./"))
+	r.Static("./", testRoot)
 
 	r.ServeHTTP(w, req)
 
@@ -359,7 +359,7 @@ func TestHandleStaticDir(t *testing.T) {
 	w := httptest.NewRecorder()
 
 	r := Default()
-	r.ServeFiles("/*filepath", http.Dir("./"))
+	r.Static("/", "./")
 
 	r.ServeHTTP(w, req)