Skip to content

Commit 5b54733

Browse files
committed
test(knowledge): count projection requests per connector ACL case
1 parent 6309546 commit 5b54733

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎apps/sim/lib/knowledge/__integration__/knowledge-projection.integration.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ afterAll(async () => {
418418
* so no synchronous trigger would write the Tin row.
419419
*/
420420
beforeEach(async () => {
421+
requestKnowledgeProjection.mockClear()
421422
await db.delete(embedding).where(eq(embedding.documentId, documentId))
422423
await db
423424
.update(document)
@@ -666,7 +667,7 @@ describe('the projector', () => {
666667
} finally {
667668
enabledFlags.delete('knowledge-async-projection')
668669
}
669-
expect(requestKnowledgeProjection).toHaveBeenCalled()
670+
expect(requestKnowledgeProjection).toHaveBeenCalledOnce()
670671
expect(await markOf()).toMatchObject({ content: false })
671672
expect((await rowAcl(embeddingSearch))?.acl).toEqual(
672673
flagOn ? aclOf('alice', 'bob') : aclOf('bob')

0 commit comments

Comments
 (0)