Adding test case.

This commit is contained in:
mike12345567 2023-10-06 16:38:36 +01:00
parent d4335bca73
commit 0dc28122fa
1 changed files with 9 additions and 0 deletions

View File

@ -154,6 +154,15 @@ describe("bbReferenceProcessor", () => {
expect(result).toEqual(null)
})
it("should convert user medata IDs to global IDs", async () => {
const userId = _.sample(users)!._id!
const userMetadataId = backendCore.db.generateUserMetadataID(userId)
const result = await config.doInTenant(() =>
processInputBBReferences(userMetadataId, FieldSubtype.USER)
)
expect(result).toBe(userId)
})
})
})