btc-pay-checker/internal/services/btc/rpc_request_test.go

28 lines
539 B
Go
Raw Normal View History

2023-07-19 11:47:46 +02:00
package btc
import (
"log"
"testing"
"github.com/stretchr/testify/require"
)
func TestCreateSendTransaction(t *testing.T) {
th := newTestHelper()
req := th.b.
NewRPCRequest().
WithMethod(GET_BALANCE)
require.NotNil(t, req)
resp, err := req.Call()
require.NoError(t, err)
strinResp := string(resp)
require.NotEmpty(t, string(strinResp))
log.Println(strinResp)
// unspent, err := NewListUnspentResponse(resp)
// require.NoError(t, err)
// require.Nil(t, unspent.Error)
// require.Greater(t, len(unspent.Result), 0)
}