Files
gocryptotrader/communications/communications_test.go
Adrian Gallagher 7dcb1ab553 Migrate from gometalinter.v2 to golangci-lint (#249)
* Migrate from gometalinter.v2 to golangci-lint
2019-03-01 16:10:29 +11:00

29 lines
664 B
Go

package communications
import (
"testing"
"github.com/thrasher-/gocryptotrader/config"
)
func TestNewComm(t *testing.T) {
var cfg config.CommunicationsConfig
communications := NewComm(&cfg)
if len(communications.IComm) != 0 {
t.Errorf("Test failed, communications NewComm, expected len 0, got len %d",
len(communications.IComm))
}
cfg.TelegramConfig.Enabled = true
cfg.SMSGlobalConfig.Enabled = true
cfg.SMTPConfig.Enabled = true
cfg.SlackConfig.Enabled = true
communications = NewComm(&cfg)
if len(communications.IComm) != 4 {
t.Errorf("Test failed, communications NewComm, expected len 4, got len %d",
len(communications.IComm))
}
}