1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-08 05:57:03 +09:00

save space hash

This commit is contained in:
Sergey Cherepanov 2023-01-13 19:13:26 +03:00 committed by Mikhail Iudin
parent 7794373b3c
commit ccfcc2f399
No known key found for this signature in database
GPG key ID: FAAAA8BAABDFF1C0
5 changed files with 45 additions and 10 deletions

View file

@ -148,11 +148,14 @@ func TestDiffSyncer_Sync(t *testing.T) {
t.Run("update heads updates diff", func(t *testing.T) {
newId := "newId"
newHeads := []string{"h1", "h2"}
hash := "hash"
diffMock.EXPECT().Set(ldiff.Element{
Id: newId,
Head: concatStrings(newHeads),
})
diffMock.EXPECT().Hash().Return(hash)
delState.EXPECT().Exists(newId).Return(false)
stMock.EXPECT().WriteSpaceHash(hash)
diffSyncer.UpdateHeads(newId, newHeads)
})