go-xmpp/component_test.go

23 lines
423 B
Go
Raw Normal View History

package xmpp
import "testing"
func TestHandshake(t *testing.T) {
c := Component{
Host: "test.localhost",
Secret: "mypass",
}
streamID := "1263952298440005243"
expected := "c77e2ef0109fbbc5161e83b51629cd1353495332"
2018-01-12 09:14:41 -08:00
result := c.handshake(streamID)
if result != expected {
t.Errorf("incorrect handshake calculation '%s' != '%s'", result, expected)
}
}
2018-01-25 14:16:55 -08:00
func TestGenerateHandshake(t *testing.T) {
// TODO
}