feat: set up project
This commit is contained in:
27
internal/services/btc/rpc_request_test.go
Normal file
27
internal/services/btc/rpc_request_test.go
Normal file
@@ -0,0 +1,27 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user