prysm-pulse/beacon-chain/core/blocks/genesis_test.go
Victor Farazdagi f575a81afd
Applies assertion funcs to beacon-chain/core/blocks tests (#6939)
* beacon-chain/core/blocks/spectest tests updated
* beacon-chain/core/blocks tests updated
* Merge refs/heads/master into apply-testutils-assertions-to-core-blocks
* Merge refs/heads/master into apply-testutils-assertions-to-core-blocks
* Merge refs/heads/master into apply-testutils-assertions-to-core-blocks
2020-08-08 19:06:04 +00:00

17 lines
482 B
Go

package blocks_test
import (
"testing"
"github.com/prysmaticlabs/prysm/beacon-chain/core/blocks"
"github.com/prysmaticlabs/prysm/shared/testutil/assert"
)
func TestGenesisBlock_InitializedCorrectly(t *testing.T) {
stateHash := []byte{0}
b1 := blocks.NewGenesisBlock(stateHash)
assert.NotNil(t, b1.Block.ParentRoot, "Genesis block missing ParentHash field")
assert.DeepEqual(t, b1.Block.StateRoot, stateHash, "Genesis block StateRootHash32 isn't initialized correctly")
}