package main
import (
"html/template"
"io"
"log"
"testing"
"git.sr.ht/~michalr/go-satel"
"github.com/stretchr/testify/assert"
)
var (
tgSenderMessageTest1 = satel.BasicEventElement{Type: satel.ArmedPartition, Index: 1, Value: true}
)
func TestTelegramSender_NoChatIdsWontSendAnything(t *testing.T) {
a := assert.New(t)
tpl := template.Must(template.New("TelegramMessage").Parse(""))
mockBot := MockTgBotAPI{}
tested := TgSender{&mockBot, MockSatelNameGetter{"mockPart"}, log.New(io.Discard, "", 0), []int64{}}
tested.Send(GenericMessage{[]satel.BasicEventElement{tgSenderMessageTest1}}, tpl)
a.Equal(0, len(mockBot.messages))
}