Skip to content

Commit

Permalink
add test for binance new function
Browse files Browse the repository at this point in the history
  • Loading branch information
zenixls2 committed Mar 12, 2024
1 parent f1a4879 commit 465e7d8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/exchange/binance/exchange_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package binance

import (
"context"
"strings"
"testing"

Expand All @@ -15,3 +16,12 @@ func Test_newClientOrderID(t *testing.T) {
cID = newSpotClientOrderID("myid1")
assert.Equal(t, cID, "x-"+spotBrokerID+"myid1")
}

func Test_new(t *testing.T) {
ex := New("", "")
assert.NotEmpty(t, ex)
ctx := context.Background()
ticker, err := ex.QueryTicker(ctx, "btcusdt")
assert.NotEmpty(t, ticker)
assert.NoError(t, err)
}

0 comments on commit 465e7d8

Please sign in to comment.