Manu Mtz-Almeida 11 лет назад
Родитель
Сommit
94f2f3f7eb
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      gin_test.go

+ 4 - 0
gin_test.go

@@ -10,6 +10,10 @@ import (
 	"testing"
 )
 
+func init() {
+	SetMode(TestMode)
+}
+
 func PerformRequest(r http.Handler, method, path string) *httptest.ResponseRecorder {
 	req, _ := http.NewRequest(method, path, nil)
 	w := httptest.NewRecorder()