-
-
Notifications
You must be signed in to change notification settings - Fork 125
Validate body of MockContext #569
Copy link
Copy link
Open
Description
Is your feature request related to a problem? Please describe.
In my tests I use fuego.MockContext. The Body() method just returns mockCtx.RequestBody that can be set during fuego.NewMockContext(), skipping any validation that would happen with a real request context.
Describe the solution you'd like
I would like the Body() method to perform proper validation on mockCtx.request.Body if mockCtx.RequestBody is unset.
Describe alternatives you've considered
I have found no way to test validation via the route itself.
Additional context
It might be necessary to address #568 first to be able to actually set mockCtx.request.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels