summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/stretchr/testify/http
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2018-04-16 05:37:14 -0700
committerJoram Wilander <jwawilander@gmail.com>2018-04-16 08:37:14 -0400
commit6e2cb00008cbf09e556b00f87603797fcaa47e09 (patch)
tree3c0eb55ff4226a3f024aad373140d1fb860a6404 /vendor/github.com/stretchr/testify/http
parentbf24f51c4e1cc6286885460672f7f449e8c6f5ef (diff)
downloadchat-6e2cb00008cbf09e556b00f87603797fcaa47e09.tar.gz
chat-6e2cb00008cbf09e556b00f87603797fcaa47e09.tar.bz2
chat-6e2cb00008cbf09e556b00f87603797fcaa47e09.zip
Depenancy upgrades and movign to dep. (#8630)
Diffstat (limited to 'vendor/github.com/stretchr/testify/http')
-rw-r--r--vendor/github.com/stretchr/testify/http/doc.go2
-rw-r--r--vendor/github.com/stretchr/testify/http/test_response_writer.go49
-rw-r--r--vendor/github.com/stretchr/testify/http/test_round_tripper.go17
3 files changed, 0 insertions, 68 deletions
diff --git a/vendor/github.com/stretchr/testify/http/doc.go b/vendor/github.com/stretchr/testify/http/doc.go
deleted file mode 100644
index 695167c6d..000000000
--- a/vendor/github.com/stretchr/testify/http/doc.go
+++ /dev/null
@@ -1,2 +0,0 @@
-// Package http DEPRECATED USE net/http/httptest
-package http
diff --git a/vendor/github.com/stretchr/testify/http/test_response_writer.go b/vendor/github.com/stretchr/testify/http/test_response_writer.go
deleted file mode 100644
index 5c3f813fa..000000000
--- a/vendor/github.com/stretchr/testify/http/test_response_writer.go
+++ /dev/null
@@ -1,49 +0,0 @@
-package http
-
-import (
- "net/http"
-)
-
-// TestResponseWriter DEPRECATED: We recommend you use http://golang.org/pkg/net/http/httptest instead.
-type TestResponseWriter struct {
-
- // StatusCode is the last int written by the call to WriteHeader(int)
- StatusCode int
-
- // Output is a string containing the written bytes using the Write([]byte) func.
- Output string
-
- // header is the internal storage of the http.Header object
- header http.Header
-}
-
-// Header DEPRECATED: We recommend you use http://golang.org/pkg/net/http/httptest instead.
-func (rw *TestResponseWriter) Header() http.Header {
-
- if rw.header == nil {
- rw.header = make(http.Header)
- }
-
- return rw.header
-}
-
-// Write DEPRECATED: We recommend you use http://golang.org/pkg/net/http/httptest instead.
-func (rw *TestResponseWriter) Write(bytes []byte) (int, error) {
-
- // assume 200 success if no header has been set
- if rw.StatusCode == 0 {
- rw.WriteHeader(200)
- }
-
- // add these bytes to the output string
- rw.Output = rw.Output + string(bytes)
-
- // return normal values
- return 0, nil
-
-}
-
-// WriteHeader DEPRECATED: We recommend you use http://golang.org/pkg/net/http/httptest instead.
-func (rw *TestResponseWriter) WriteHeader(i int) {
- rw.StatusCode = i
-}
diff --git a/vendor/github.com/stretchr/testify/http/test_round_tripper.go b/vendor/github.com/stretchr/testify/http/test_round_tripper.go
deleted file mode 100644
index b1e32f1d8..000000000
--- a/vendor/github.com/stretchr/testify/http/test_round_tripper.go
+++ /dev/null
@@ -1,17 +0,0 @@
-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)
-}