Skip to content

Commit

Permalink
Adding tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fridrik01 committed May 5, 2023
1 parent 64a7ccf commit cf17fa1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions itests/eth_filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,11 @@ func TestEthNewFilterDefaultSpec(t *testing.T) {
elogs, err := parseEthLogsFromFilterResult(res)
require.NoError(err)
AssertEthLogs(t, elogs, expected, received)

// giving a number to fromBlock/toBlock needs to be in hex format, so make sure passing in decimal fails
blockNrInDecimal := "2812200"
_, err = client.EthNewFilter(ctx, &ethtypes.EthFilterSpec{FromBlock: &blockNrInDecimal, ToBlock: &blockNrInDecimal})
require.Error(err, "expected error when fromBlock/toBlock is not in hex format")
}

func TestEthGetLogsBasic(t *testing.T) {
Expand Down

0 comments on commit cf17fa1

Please sign in to comment.