fix: #2842, querying number custom ids with in

This commit is contained in:
James
2023-06-19 11:02:30 -04:00
parent da2a94d0b2
commit 116e9ffe81
2 changed files with 25 additions and 4 deletions

View File

@@ -326,6 +326,22 @@ describe('collections-rest', () => {
const { doc: updatedDoc } = await client.update({ slug: customIdNumberSlug, id: doc.id, data: { name: 'updated' } });
expect(updatedDoc.name).toEqual('updated');
});
it('should allow querying by in', async () => {
const id = 98234698237;
await client.create({ slug: customIdNumberSlug, data: { id, name: 'query using in operator' } });
const { result: { docs } } = await client.find({
slug: customIdNumberSlug,
query: {
id: {
in: `${id}, ${2349856723948764}`,
},
},
});
expect(docs).toHaveLength(1);
});
});
});