From 0a4dfa9920856db9562a95a71376489f41e5d2c6 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Tue, 5 Feb 2019 21:27:07 +0400 Subject: [PATCH] test full response --- rpc/client/rpc_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rpc/client/rpc_test.go b/rpc/client/rpc_test.go index 6926f8e44..1f71beeb6 100644 --- a/rpc/client/rpc_test.go +++ b/rpc/client/rpc_test.go @@ -290,9 +290,13 @@ func TestUnconfirmedTxs(t *testing.T) { for i, c := range GetClients() { mc, ok := c.(client.MempoolClient) require.True(t, ok, "%d", i) - txs, err := mc.UnconfirmedTxs(1) + res, err := mc.UnconfirmedTxs(1) require.Nil(t, err, "%d: %+v", i, err) - assert.Exactly(t, types.Txs{tx}, types.Txs(txs.Txs)) + + assert.Equal(t, 1, res.Count) + assert.Equal(t, 1, res.Total) + assert.Equal(t, mempool.TxsTotalBytes(), res.TotalBytes) + assert.Exactly(t, types.Txs{tx}, types.Txs(res.Txs)) } mempool.Flush()