Using test mode
This commit is contained in:
		@ -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()
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user