network/metadata/default_test.go

22 lines
339 B
Go
Raw Permalink Normal View History

2023-04-05 16:15:59 +08:00
package metadata
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestMetadata(t *testing.T) {
builder := DefaultBuilder()
m, err := builder.Build(nil)
assert.NoError(t, err)
assert.Equal(t, []uint8([]byte(nil)), m.Encode())
de, err := builder.Decode([]byte{})
assert.NoError(t, err)
assert.Equal(t, m, de)
}