Files
gocryptotrader/cmd/exchange_wrapper_issues/exchange_wrapper_issues_test.go
Gareth Kirwan 3caa149d8e 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
2025-05-07 11:32:06 +10:00

31 lines
548 B
Go

package main
import (
"testing"
"github.com/thrasher-corp/gocryptotrader/currency"
)
func TestDisruptFormatting(t *testing.T) {
_, err := disruptFormatting(currency.EMPTYPAIR)
if err == nil {
t.Fatal("error cannot be nil")
}
_, err = disruptFormatting(currency.Pair{Quote: currency.BTC})
if err == nil {
t.Fatal("error cannot be nil")
}
p := currency.NewBTCUSDT()
badPair, err := disruptFormatting(p)
if err != nil {
t.Fatal(err)
}
if badPair.String() != "BTC-TEST-DELIM-usdt" {
t.Fatal("incorrect disrupted pair")
}
}