frostfs-api-go-pogpp/v2/tombstone/json_test.go
Leonard Lyubich 6037a26a35 [#226] v2/tombstone: Implement unified message structure with methods
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-10 18:26:23 +03:00

20 lines
372 B
Go

package tombstone_test
import (
"testing"
"github.com/nspcc-dev/neofs-api-go/v2/tombstone"
"github.com/stretchr/testify/require"
)
func TestTombstoneJSON(t *testing.T) {
from := generateTombstone()
data, err := from.MarshalJSON()
require.NoError(t, err)
to := new(tombstone.Tombstone)
require.NoError(t, to.UnmarshalJSON(data))
require.Equal(t, from, to)
}