frostfs-api-go/v2/audit/json_test.go
Leonard Lyubich 9986a4ecd1 [#233] Implement data audit result type with basic methods
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-25 16:20:34 +03:00

20 lines
369 B
Go

package audit_test
import (
"testing"
"github.com/nspcc-dev/neofs-api-go/v2/audit"
"github.com/stretchr/testify/require"
)
func TestDataAuditResultJSON(t *testing.T) {
a := generateDataAuditResult()
data, err := a.MarshalJSON()
require.NoError(t, err)
a2 := new(audit.DataAuditResult)
require.NoError(t, a2.UnmarshalJSON(data))
require.Equal(t, a, a2)
}