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

23 lines
819 B
Go

package coordinatorproto
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestValidateDeleteConfirmation(t *testing.T) {
fx := newFixture(t)
delConfirm, err := PrepareDeleteConfirmation(fx.accountPrivKey, fx.spaceId, fx.peerId, fx.networkKey.GetPublic().Network())
require.NoError(t, err)
err = ValidateDeleteConfirmation(fx.accountKey, fx.spaceId, fx.networkKey.GetPublic().Network(), delConfirm)
require.NoError(t, err)
}
func TestValidateAccountDeleteConfirmation(t *testing.T) {
fx := newFixture(t)
delConfirm, err := PrepareAccountDeleteConfirmation(fx.accountPrivKey, fx.peerId, fx.networkKey.GetPublic().Network())
require.NoError(t, err)
err = ValidateAccountDeleteConfirmation(fx.accountKey, fx.spaceId, fx.networkKey.GetPublic().Network(), delConfirm)
require.NoError(t, err)
}