mirror of
https://github.com/diamondburned/arikawa.git
synced 2025-01-07 12:38:05 +00:00
httpdriver: Fix MockResponse not impl'ing Response
This commit is contained in:
parent
bf75621068
commit
ea4beab6bd
|
@ -10,6 +10,11 @@ import (
|
|||
"reflect"
|
||||
)
|
||||
|
||||
var (
|
||||
_ Request = (*MockRequest)(nil)
|
||||
_ Response = (*MockResponse)(nil)
|
||||
)
|
||||
|
||||
// MockRequest is a mock request. It implements the Request interface.
|
||||
type MockRequest struct {
|
||||
Method string
|
||||
|
@ -162,10 +167,10 @@ func (r *MockResponse) GetStatus() int {
|
|||
return r.StatusCode
|
||||
}
|
||||
|
||||
func (r *MockRequest) GetHeader() http.Header {
|
||||
func (r *MockResponse) GetHeader() http.Header {
|
||||
return r.Header
|
||||
}
|
||||
|
||||
func (r *MockRequest) GetBody() io.ReadCloser {
|
||||
func (r *MockResponse) GetBody() io.ReadCloser {
|
||||
return io.NopCloser(bytes.NewReader(r.Body))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue