mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-30 07:26:46 +00:00
Tests: Use currency.NewBTCUSD and NewBTCUSDT (#1895)
* Tests: Use currency.NewUSD and NewUSDT Simple refactor to use the provided shortcut methods * Github: Add CI check to ensure NewPair not used Add a step to ensure NewPair(BTC, USD*) isn't used
This commit is contained in:
@@ -38,7 +38,7 @@ func TestSubscribeTicker(t *testing.T) {
|
||||
t.Error("error cannot be nil")
|
||||
}
|
||||
|
||||
p := currency.NewPair(currency.BTC, currency.USD)
|
||||
p := currency.NewBTCUSD()
|
||||
|
||||
// force error
|
||||
service.mux = nil
|
||||
@@ -104,7 +104,7 @@ func TestSubscribeToExchangeTickers(t *testing.T) {
|
||||
t.Error("error cannot be nil")
|
||||
}
|
||||
|
||||
p := currency.NewPair(currency.BTC, currency.USD)
|
||||
p := currency.NewBTCUSD()
|
||||
|
||||
err = ProcessTicker(&Price{
|
||||
Pair: p,
|
||||
@@ -279,7 +279,7 @@ func TestProcessTicker(t *testing.T) { // non-appending function to tickers
|
||||
|
||||
err = ProcessTicker(&Price{
|
||||
ExchangeName: "Bitfinex",
|
||||
Pair: currency.NewPair(currency.BTC, currency.USD),
|
||||
Pair: currency.NewBTCUSD(),
|
||||
AssetType: asset.Margin,
|
||||
Bid: 1337,
|
||||
Ask: 1337,
|
||||
@@ -288,7 +288,7 @@ func TestProcessTicker(t *testing.T) { // non-appending function to tickers
|
||||
|
||||
err = ProcessTicker(&Price{
|
||||
ExchangeName: "Bitfinex",
|
||||
Pair: currency.NewPair(currency.BTC, currency.USD),
|
||||
Pair: currency.NewBTCUSD(),
|
||||
AssetType: asset.Margin,
|
||||
Bid: 1338,
|
||||
Ask: 1336,
|
||||
@@ -299,7 +299,7 @@ func TestProcessTicker(t *testing.T) { // non-appending function to tickers
|
||||
|
||||
err = ProcessTicker(&Price{
|
||||
ExchangeName: "Bitfinex",
|
||||
Pair: currency.NewPair(currency.BTC, currency.USD),
|
||||
Pair: currency.NewBTCUSD(),
|
||||
AssetType: asset.MarginFunding,
|
||||
Bid: 1338,
|
||||
Ask: 1336,
|
||||
|
||||
Reference in New Issue
Block a user