summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/stretchr/testify/http/test_round_tripper.go
blob: b1e32f1d86b57e4d1026ca92b96ce044810ae996 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package http

import (
	"github.com/stretchr/testify/mock"
	"net/http"
)

// 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)
}