Files
gocryptotrader/communications/telegram/telegram_test.go
Ryan O'Hara-Reid 9d0616d8cf New communications package
Support for Slack, SMSGlobal, SMTP and Telegram

Supersedes: https://github.com/thrasher-/gocryptotrader/pull/126
2018-06-08 14:09:36 +10:00

31 lines
593 B
Go

package telegram
import (
"testing"
"github.com/thrasher-/gocryptotrader/communications/base"
"github.com/thrasher-/gocryptotrader/config"
)
var T Telegram
func TestSetup(t *testing.T) {
cfg := config.GetConfig()
cfg.LoadConfig("../../testdata/configtest.json")
T.Setup(cfg.GetCommunicationsConfig())
}
func TestConnect(t *testing.T) {
err := T.Connect()
if err == nil {
t.Error("test failed - telegram Connect() error", err)
}
}
func PushEvent(t *testing.T) {
err := T.PushEvent(base.Event{})
if err != nil {
t.Error("test failed - telegram PushEvent() error", err)
}
}