From 6e2464fb58d43d06b9628bc8121ed04ca08e39f9 Mon Sep 17 00:00:00 2001 From: Ryan O'Hara-Reid Date: Sat, 1 Apr 2017 14:25:39 +1100 Subject: [PATCH] refactor - import common.go --- exchanges/bitfinex/bitfinex_test.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/exchanges/bitfinex/bitfinex_test.go b/exchanges/bitfinex/bitfinex_test.go index d4f0bf12..bdf19a8f 100644 --- a/exchanges/bitfinex/bitfinex_test.go +++ b/exchanges/bitfinex/bitfinex_test.go @@ -6,6 +6,8 @@ import ( "reflect" "strconv" "testing" + + "github.com/thrasher-/gocryptotrader/common" ) var ACCOUNT_LIVE_TEST bool = true @@ -532,7 +534,7 @@ func TestBitfinexGetAccountInfo(t *testing.T) { } if len(expectedCryptoCurrencies) == len(accountInfoLive[0].Fees) { - if !DataContains(expectedCryptoCurrencies, accountInfoLive[0].Fees[0].Pairs) { + if !common.DataContains(expectedCryptoCurrencies, accountInfoLive[0].Fees[0].Pairs) { t.Error("Bitfinex GetAccountInfo currency mismatch") } } else if len(expectedCryptoCurrencies) > len(accountInfoLive[0].Fees) { @@ -694,10 +696,10 @@ func TestBitfinexNewDeposit(t *testing.T) { //Needs attention if len(liveResponse.Address) != 34 { t.Error("Bitfinex NewDeposit.Address is incorrect") } - if !DataContains(expectedCryptoCurrencies, liveResponse.Currency) { + if !common.DataContains(expectedCryptoCurrencies, liveResponse.Currency) { t.Error("Bitfinex NewDeposit.Currency currency mismatch" + liveResponse.Currency) } - if !DataContains(applicableMethods, liveResponse.Method) { + if !common.DataContains(applicableMethods, liveResponse.Method) { t.Error("Bitfinex NewDeposit.Method method mismatch") } if liveResponse.Result != "" && liveResponse.Result != "success" { @@ -730,10 +732,10 @@ func TestBitfinexNewDeposit(t *testing.T) { //Needs attention if len(nonLiveResponse.Address) != 34 { t.Error("Bitfinex NewDeposit.Address is incorrect") } - if !DataContains(expectedCryptoCurrencies, nonLiveResponse.Currency) { + if !common.DataContains(expectedCryptoCurrencies, nonLiveResponse.Currency) { t.Error("Bitfinex NewDeposit.Currency currency mismatch") } - if !DataContains(applicableMethods, nonLiveResponse.Method) { + if !common.DataContains(applicableMethods, nonLiveResponse.Method) { t.Error("Bitfinex NewDeposit.Method method mismatch") } if nonLiveResponse.Result != "" && nonLiveResponse.Result != "success" {