From aed235f52d61e8fcff207786693b7219234a6adf Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Mon, 29 May 2023 09:44:49 +0000 Subject: [PATCH] chore(httpproxy): add `Test_returnRedirect` to prevent error wrap of `ErrUseLastResponse` --- internal/httpproxy/handler_test.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 internal/httpproxy/handler_test.go diff --git a/internal/httpproxy/handler_test.go b/internal/httpproxy/handler_test.go new file mode 100644 index 00000000..7eadc960 --- /dev/null +++ b/internal/httpproxy/handler_test.go @@ -0,0 +1,16 @@ +package httpproxy + +import ( + "net/http" + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_returnRedirect(t *testing.T) { + t.Parallel() + + err := returnRedirect(nil, nil) + + assert.Equal(t, http.ErrUseLastResponse, err) +}