prysm-pulse/beacon-chain/db/kv/encoding_test.go
Raul Jordan a9a4bb9163
Move Shared/Testutil into Testing (#9659)
* move testutil

* util pkg

* build

* gaz

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-23 18:53:46 +00:00

18 lines
365 B
Go

package kv
import (
"context"
"testing"
testpb "github.com/prysmaticlabs/prysm/proto/testing"
"github.com/prysmaticlabs/prysm/testing/require"
)
func Test_encode_handlesNilFromFunction(t *testing.T) {
foo := func() *testpb.Puzzle {
return nil
}
_, err := encode(context.Background(), foo())
require.ErrorContains(t, "cannot encode nil message", err)
}