Newer
Older
pokemon-go-trade / vendor / github.com / stretchr / testify / http / test_round_tripper.go
Simon Lindgren on 12 Feb 2021 377 bytes first commit
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)
}