소스 검색

Using test mode

Manu Mtz-Almeida 11 년 전
부모
커밋
94f2f3f7eb
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      gin_test.go

+ 4 - 0
gin_test.go

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