tests: Refactor expectValidationError to use consistent parameter naming
This commit is contained in:
parent
edab6bba31
commit
78f6d7d8cc
@ -44,8 +44,8 @@ export const expectErrorResponse = (
|
||||
);
|
||||
};
|
||||
|
||||
export const expectValidationError = (response: any, path: string, message: string) => {
|
||||
expectErrorResponse(response, 422, 'Unprocessable Entity', 'Invalid request', [{ field: path, message }]);
|
||||
export const expectValidationError = (response: any, field: string, message: string) => {
|
||||
expectErrorResponse(response, 422, 'Unprocessable Entity', 'Invalid request', [{ field, message }]);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user