testify/http/test_round_tripper.go
Christian Muehlhaeuser 3acde138ca Format code with goimports
Fixed formatting and import order.
2020-03-06 14:39:08 +11:00

19 lines
378 B
Go

package http
import (
"net/http"
"github.com/stretchr/testify/mock"
)
// TestRoundTripper DEPRECATED USE net/http/httptest
type TestRoundTripper struct {
mock.Mock
}
// RoundTrip DEPRECATED USE net/http/httptest
func (t *TestRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
args := t.Called(req)
return args.Get(0).(*http.Response), args.Error(1)
}