File tree 1 file changed +18
-1
lines changed
apps/meteor/tests/unit/app/cloud/server/functions/syncWorkspace
1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ describe('SyncCloudData', () => {
31
31
mockedFetchWorkspaceSyncPayload . reset ( ) ;
32
32
} ) ;
33
33
34
- it ( 'should save cloudSyncAnnouncement on Cloud_Sync_Announcement_Payload when present' , async ( ) => {
34
+ it ( 'should save cloudSyncAnnouncement payload on Cloud_Sync_Announcement_Payload setting when present' , async ( ) => {
35
35
const workspaceSyncPayloadResponse = {
36
36
workspaceId : 'workspaceId' ,
37
37
publicKey : 'publicKey' ,
@@ -79,4 +79,21 @@ describe('SyncCloudData', () => {
79
79
) ,
80
80
) . to . be . true ;
81
81
} ) ;
82
+
83
+ it ( 'Should ignore the setting update if cloudSyncAnnouncement is not present' , async ( ) => {
84
+ const workspaceSyncPayloadResponse = {
85
+ workspaceId : 'workspaceId' ,
86
+ publicKey : 'publicKey' ,
87
+ license : { } ,
88
+ removeLicense : false ,
89
+ } ;
90
+
91
+ mockedFetchWorkspaceSyncPayload . resolves ( workspaceSyncPayloadResponse ) ;
92
+
93
+ await syncCloudData ( ) ;
94
+
95
+ expect ( mockedFetchWorkspaceSyncPayload . calledOnce ) . to . be . true ;
96
+
97
+ expect ( models . Settings . updateValueById . notCalled ) . to . be . true ;
98
+ } ) ;
82
99
} ) ;
You can’t perform that action at this time.
0 commit comments