mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-23 07:26:47 +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:
@@ -17,7 +17,7 @@ func TestDisruptFormatting(t *testing.T) {
|
||||
t.Fatal("error cannot be nil")
|
||||
}
|
||||
|
||||
p := currency.NewPair(currency.BTC, currency.USDT)
|
||||
p := currency.NewBTCUSDT()
|
||||
|
||||
badPair, err := disruptFormatting(p)
|
||||
if err != nil {
|
||||
|
||||
@@ -676,7 +676,7 @@ func getPairFromPairs(t *testing.T, p currency.Pairs) (currency.Pair, error) {
|
||||
return p[i], nil
|
||||
}
|
||||
}
|
||||
goodBtc := currency.NewPair(currency.BTC, currency.USDT).Format(pFmt)
|
||||
goodBtc := currency.NewBTCUSDT().Format(pFmt)
|
||||
if p.Contains(goodBtc, true) {
|
||||
return goodBtc, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user