clair/vendor/github.com/stretchr/testify/http/test_round_tripper.go

16 lines
278 B
Go
Raw Normal View History

2016-06-07 08:08:50 +00:00
package http
import (
"github.com/stretchr/testify/mock"
"net/http"
)
type TestRoundTripper struct {
mock.Mock
}
func (t *TestRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
args := t.Called(req)
return args.Get(0).(*http.Response), args.Error(1)
}