diff --git a/apps/meteor/tests/unit/app/cloud/server/functions/syncWorkspace/syncCloudData.spec.ts b/apps/meteor/tests/unit/app/cloud/server/functions/syncWorkspace/syncCloudData.spec.ts index c85d6314baa47..b1e63b31f04df 100644 --- a/apps/meteor/tests/unit/app/cloud/server/functions/syncWorkspace/syncCloudData.spec.ts +++ b/apps/meteor/tests/unit/app/cloud/server/functions/syncWorkspace/syncCloudData.spec.ts @@ -31,7 +31,7 @@ describe('SyncCloudData', () => { mockedFetchWorkspaceSyncPayload.reset(); }); - it('should save cloudSyncAnnouncement on Cloud_Sync_Announcement_Payload when present', async () => { + it('should save cloudSyncAnnouncement payload on Cloud_Sync_Announcement_Payload setting when present', async () => { const workspaceSyncPayloadResponse = { workspaceId: 'workspaceId', publicKey: 'publicKey', @@ -79,4 +79,21 @@ describe('SyncCloudData', () => { ), ).to.be.true; }); + + it('Should ignore the setting update if cloudSyncAnnouncement is not present', async () => { + const workspaceSyncPayloadResponse = { + workspaceId: 'workspaceId', + publicKey: 'publicKey', + license: {}, + removeLicense: false, + }; + + mockedFetchWorkspaceSyncPayload.resolves(workspaceSyncPayloadResponse); + + await syncCloudData(); + + expect(mockedFetchWorkspaceSyncPayload.calledOnce).to.be.true; + + expect(models.Settings.updateValueById.notCalled).to.be.true; + }); });