mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-20 23:41:23 +02:00
cleanup and simplify middleware implementations, refactor some other code
This commit is contained in:
@@ -43,7 +43,7 @@ func TestModifyRequest(t *testing.T) {
|
||||
}
|
||||
|
||||
t.Run("set_options", func(t *testing.T) {
|
||||
mr, err := ModifyRequest.WithOptionsClone(opts)
|
||||
mr, err := ModifyRequest.New(opts)
|
||||
ExpectNoError(t, err)
|
||||
ExpectDeepEqual(t, mr.impl.(*modifyRequest).SetHeaders, opts["set_headers"].(map[string]string))
|
||||
ExpectDeepEqual(t, mr.impl.(*modifyRequest).AddHeaders, opts["add_headers"].(map[string]string))
|
||||
|
||||
Reference in New Issue
Block a user