mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-08 05:57:03 +09:00
AddContent correct encryption and tests
This commit is contained in:
parent
adac306d86
commit
141ab46e38
2 changed files with 11 additions and 1 deletions
|
@ -102,7 +102,7 @@ func TestObjectTree(t *testing.T) {
|
|||
aclList, keys := prepareAclList(t)
|
||||
ctx := context.Background()
|
||||
|
||||
t.Run("validate no read key", func(t *testing.T) {
|
||||
t.Run("user delete logic: validation, key change, decryption", func(t *testing.T) {
|
||||
exec := list.NewAclExecutor("spaceId")
|
||||
type cmdErr struct {
|
||||
cmd string
|
||||
|
@ -168,6 +168,12 @@ func TestObjectTree(t *testing.T) {
|
|||
Heads: heads,
|
||||
}, BuildKeyVerifiableObjectTree, bAccount.Acl)
|
||||
require.Equal(t, ErrHasInvalidChanges, err)
|
||||
err = aTree.IterateRoot(func(change *Change, decrypted []byte) (any, error) {
|
||||
return nil, nil
|
||||
}, func(change *Change) bool {
|
||||
return true
|
||||
})
|
||||
require.NoError(t, err)
|
||||
})
|
||||
|
||||
t.Run("add content", func(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue