Skip to content

Commit 8ae121d

Browse files
committed
updated tests
1 parent 3228c1a commit 8ae121d

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

v2/delivery/order_service_test.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package delivery
22

33
import (
4+
"strconv"
45
"testing"
56

67
"github.com/stretchr/testify/suite"
@@ -71,15 +72,15 @@ func (s *orderServiceTestSuite) TestCreateOrder() {
7172
"type": orderType,
7273
"timeInForce": timeInForce,
7374
"quantity": quantity,
74-
"reduceOnly": reduceOnly,
75+
"reduceOnly": strconv.FormatBool(reduceOnly),
7576
"price": price,
7677
"newClientOrderId": newClientOrderID,
7778
"stopPrice": stopPrice,
78-
"closePosition": closePosition,
79+
"closePosition": strconv.FormatBool(closePosition),
7980
"activationPrice": activationPrice,
8081
"callbackRate": callbackRate,
8182
"workingType": workingType,
82-
"priceProtect": priceProtect,
83+
"priceProtect": strconv.FormatBool(priceProtect),
8384
"newOrderRespType": newOrderResponseType,
8485
})
8586
s.assertRequestEqual(e, r)

v2/futures/order_service_test.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package futures
22

33
import (
44
"context"
5+
"strconv"
56
"testing"
67

78
"github.com/adshao/go-binance/v2/common"
@@ -69,16 +70,16 @@ func (s *orderServiceTestSuite) TestCreateOrder() {
6970
"timeInForce": timeInForce,
7071
"positionSide": positionSide,
7172
"quantity": quantity,
72-
"reduceOnly": reduceOnly,
73+
"reduceOnly": strconv.FormatBool(reduceOnly),
7374
"price": price,
7475
"newClientOrderId": newClientOrderID,
7576
"stopPrice": stopPrice,
7677
"workingType": workingType,
7778
"activationPrice": activationPrice,
7879
"callbackRate": callbackRate,
79-
"priceProtect": priceProtect,
80+
"priceProtect": strconv.FormatBool(priceProtect),
8081
"newOrderRespType": newOrderResponseType,
81-
"closePosition": closePosition,
82+
"closePosition": strconv.FormatBool(closePosition),
8283
})
8384
s.assertRequestEqual(e, r)
8485
})

0 commit comments

Comments
 (0)