mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
* exchanges: Start removal of FTX * Get tests happy again * okx: improve logic and add basic coverage * Fix linterino * Round 2 plus rm useless assignment in test * Fix exchange_wrapper_issues test error * Fix nitters * Address nitters
31 lines
572 B
Go
31 lines
572 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.NewPair(currency.BTC, currency.USDT)
|
|
|
|
badPair, err := disruptFormatting(p)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
|
|
if badPair.String() != "BTC-TEST-DELIM-usdt" {
|
|
t.Fatal("incorrect disrupted pair")
|
|
}
|
|
}
|