Files
gocryptotrader/communications/communications_test.go
Adrian Gallagher 2078ba907f Update URLs for transfer into org repo (#338)
* Update URLs for transfer into org repo

* Update codecov, travis and othe remaining links

* Update appveyor paths
2019-08-09 11:50:39 +10:00

29 lines
668 B
Go

package communications
import (
"testing"
"github.com/thrasher-corp/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))
}
}