Browse Source

Using test mode

Manu Mtz-Almeida 11 years ago
parent
commit
94f2f3f7eb
1 changed files with 4 additions and 0 deletions
  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()