Skip to content

Commit

Permalink
update jest tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SiddharthMantri committed Oct 30, 2024
1 parent b8f7605 commit 5032efd
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ describe('SavedObjectsRepository Encryption Extension', () => {

it(`fails if non-UUID ID is specified for encrypted type`, async () => {
mockEncryptionExt.isEncryptableType.mockReturnValue(true);
mockEncryptionExt.shouldEnforceRandomId.mockReturnValue(true);
mockEncryptionExt.decryptOrStripResponseAttributes.mockResolvedValue({
...encryptedSO,
...decryptedStrippedAttributes,
Expand Down Expand Up @@ -483,6 +484,7 @@ describe('SavedObjectsRepository Encryption Extension', () => {

it(`fails if non-UUID ID is specified for encrypted type`, async () => {
mockEncryptionExt.isEncryptableType.mockReturnValue(true);
mockEncryptionExt.shouldEnforceRandomId.mockReturnValue(true);
const result = await bulkCreateSuccess(client, repository, [
encryptedSO, // Predefined IDs are not allowed for saved objects with encrypted attributes unless the ID is a UUID
]);
Expand Down

0 comments on commit 5032efd

Please sign in to comment.