github.com/lmittmann/w3@v0.20.0/module/web3/web3_test.go (about) 1 package web3_test 2 3 import ( 4 "errors" 5 "testing" 6 7 "github.com/lmittmann/w3/module/web3" 8 "github.com/lmittmann/w3/rpctest" 9 ) 10 11 func TestClientVersion(t *testing.T) { 12 rpctest.RunTestCases(t, []rpctest.TestCase[string]{ 13 { 14 Golden: "client_version", 15 Call: web3.ClientVersion(), 16 WantRet: "Geth", 17 }, 18 { 19 Golden: "client_version__err", 20 Call: web3.ClientVersion(), 21 WantErr: errors.New("w3: call failed: the method web3_clientVersion does not exist/is not available"), 22 }, 23 }) 24 }