mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-22 09:09:08 +01:00
fix(tests): correct test expectations for middleware bypass and rules
This commit is contained in:
@@ -201,6 +201,7 @@ func TestBypassResponse(t *testing.T) {
|
||||
StatusCode: test.statusCode,
|
||||
Body: io.NopCloser(strings.NewReader("test")),
|
||||
Header: make(http.Header),
|
||||
Request: httptest.NewRequest("GET", "http://example.com", nil),
|
||||
}
|
||||
mErr := mr.ModifyResponse(resp)
|
||||
expect.NoError(t, mErr)
|
||||
|
||||
@@ -251,7 +251,7 @@ func TestExpandVars(t *testing.T) {
|
||||
{
|
||||
name: "req_uri",
|
||||
input: "$req_uri",
|
||||
want: "/api/users?param1=value1¶m2=value2#fragment",
|
||||
want: "/api/users?param1=value1¶m2=value2",
|
||||
},
|
||||
{
|
||||
name: "req_host",
|
||||
|
||||
Reference in New Issue
Block a user