plugeth-statediff/test_helpers/mocks/backend_test.go
Roy Crihfield 9f967abfb9 initial plugeth work
refactor packages, flags, subscriptions

also DRY up builder tests

use mockgen
2023-06-23 21:21:14 +08:00

18 lines
442 B
Go

package mocks_test
import (
"testing"
"github.com/cerc-io/plugeth-statediff/test_helpers/mocks"
"github.com/ethereum/go-ethereum"
)
func TestBackend(t *testing.T) {
startingblock := uint64(42)
b := mocks.NewBackend(t, ethereum.SyncProgress{StartingBlock: startingblock})
block := b.Downloader().Progress().StartingBlock()
if startingblock != block {
t.Fatalf("wrong StartingBlock; expected %d, got %d", startingblock, block)
}
}