prysm-pulse/beacon-chain/blockchain/receive_attestation_test.go
Victor Farazdagi deb025f57c
Applies assertion funcs to blockchain tests (#6605)
* applies assertion funcs to blockchain tests
* Merge branch 'master' into blockchain-apply-testutils-assertions
* gofmt
* Merge refs/heads/master into blockchain-apply-testutils-assertions
* Merge refs/heads/master into blockchain-apply-testutils-assertions
* Merge refs/heads/master into blockchain-apply-testutils-assertions
* Merge refs/heads/master into blockchain-apply-testutils-assertions
* Merge refs/heads/master into blockchain-apply-testutils-assertions
2020-07-16 12:11:39 +00:00

23 lines
652 B
Go

package blockchain
import (
"testing"
"time"
ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
"github.com/prysmaticlabs/prysm/beacon-chain/core/helpers"
testDB "github.com/prysmaticlabs/prysm/beacon-chain/db/testing"
"github.com/prysmaticlabs/prysm/shared/testutil/assert"
)
func TestVerifyCheckpointEpoch_Ok(t *testing.T) {
helpers.ClearCache()
db, sc := testDB.SetupDB(t)
chainService := setupBeaconChain(t, db, sc)
chainService.genesisTime = time.Now()
assert.Equal(t, true, chainService.verifyCheckpointEpoch(&ethpb.Checkpoint{}))
assert.Equal(t, false, chainService.verifyCheckpointEpoch(&ethpb.Checkpoint{Epoch: 1}))
}