prysm-pulse/beacon-chain/core/blocks/block_test.go
terence tsao 4235980511 Clean up post --next (#3411)
* Delete old code

* RPC mock testing

* Fixed BUILD

* Conflict

* Lint

* More lint
2019-09-06 22:39:14 -04:00

20 lines
369 B
Go

package blocks
import (
"bytes"
"testing"
)
func TestGenesisBlock_InitializedCorrectly(t *testing.T) {
stateHash := []byte{0}
b1 := NewGenesisBlock(stateHash)
if b1.ParentRoot == nil {
t.Error("genesis block missing ParentHash field")
}
if !bytes.Equal(b1.StateRoot, stateHash) {
t.Error("genesis block StateRootHash32 isn't initialized correctly")
}
}