Skip to content

Commit d95d7cd

Browse files
committed
Add assertion exposing mock notify() mutation
1 parent 65502ac commit d95d7cd

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

Tests/SQLiteDataTests/CloudKitTests/MergeConflictTests.swift

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,51 @@
357357
}
358358
}
359359
await modificationCallback.notify()
360+
361+
assertInlineSnapshot(of: container, as: .customDump) {
362+
"""
363+
MockCloudContainer(
364+
privateCloudDatabase: MockCloudDatabase(
365+
databaseScope: .private,
366+
storage: [
367+
[0]: CKRecord(
368+
recordID: CKRecord.ID(1:reminders/zone/__defaultOwner__),
369+
recordType: "reminders",
370+
parent: CKReference(recordID: CKRecord.ID(1:remindersLists/zone/__defaultOwner__)),
371+
share: nil,
372+
dueDate🗓️: 0,
373+
id: 1,
374+
id🗓️: 0,
375+
isCompleted: 0,
376+
isCompleted🗓️: 0,
377+
priority🗓️: 0,
378+
remindersListID: 1,
379+
remindersListID🗓️: 0,
380+
title: "Buy milk",
381+
title🗓️: 30,
382+
🗓️: 30
383+
),
384+
[1]: CKRecord(
385+
recordID: CKRecord.ID(1:remindersLists/zone/__defaultOwner__),
386+
recordType: "remindersLists",
387+
parent: nil,
388+
share: nil,
389+
id: 1,
390+
id🗓️: 0,
391+
title: "",
392+
title🗓️: 0,
393+
🗓️: 0
394+
)
395+
]
396+
),
397+
sharedCloudDatabase: MockCloudDatabase(
398+
databaseScope: .shared,
399+
storage: []
400+
)
401+
)
402+
"""
403+
}
404+
360405
try await syncEngine.processPendingRecordZoneChanges(scope: .private)
361406

362407
assertInlineSnapshot(of: container, as: .customDump) {

0 commit comments

Comments
 (0)