mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-16 23:16:48 +00:00
Support for Slack, SMSGlobal, SMTP and Telegram Supersedes: https://github.com/thrasher-/gocryptotrader/pull/126
31 lines
593 B
Go
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)
|
|
}
|
|
}
|