Using test mode

This commit is contained in:
Manu Mtz-Almeida 2014-08-21 01:01:42 +02:00
parent 0ed259ca34
commit 94f2f3f7eb
1 changed files with 4 additions and 0 deletions

View File

@ -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()