chore: working simple where

This commit is contained in:
Dan Ribbens
2023-09-06 16:25:52 -04:00
parent d07394d197
commit 2e086d95d9
7 changed files with 76 additions and 76 deletions

View File

@@ -415,8 +415,17 @@ describe('Postgres', () => {
collection: 'posts',
sort: '-slug',
});
expect(pages[0].fullName).toEqual('second');
expect(pages[1].fullName).toEqual('first');
expect(pages[0].tableName).toEqual('second');
expect(pages[1].tableName).toEqual('first');
});
it('find where', async () => {
const { docs: people } = await payload.find({
collection: 'people',
where: {
fullName: { equals: 'Dan Ribbens' },
},
});
expect(people).toHaveLength(1);
});
});