fix: Server side validation for #3112

This commit is contained in:
Tom Moor
2022-02-17 22:51:18 -08:00
parent 3d5bf56d09
commit 9db6951434
3 changed files with 17 additions and 3 deletions

View File

@@ -1263,6 +1263,17 @@ describe("#documents.search", () => {
expect(body.data.length).toEqual(0);
});
it("should expect a query", async () => {
const { user } = await seed();
const res = await server.post("/api/documents.search", {
body: {
token: user.getJwtToken(),
query: " ",
},
});
expect(res.status).toEqual(400);
});
it("should not allow unknown dateFilter values", async () => {
const { user } = await seed();
const res = await server.post("/api/documents.search", {