Skip to content

Commit

Permalink
Fix test with new resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
afharo committed Dec 18, 2019
1 parent e394259 commit 1ece254
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/server/http/router/request.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ describe('KibanaRequest', () => {
const kibanaRequest = KibanaRequest.from(request, {
params: schema.object({ id: schema.string() }),
query: schema.object({ search: schema.string() }),
body: data => {
body: ({ ok, fail }, data) => {
if (Buffer.isBuffer(data)) {
return { value: data };
return ok(data);
} else {
return { error: new RouteValidationError('It should be a Buffer', []) };
return fail('It should be a Buffer', []);
}
},
});
Expand Down

0 comments on commit 1ece254

Please sign in to comment.