Adhoc test component can successfully connect to ejabberd

This commit is contained in:
Mickael Remond
2018-01-12 18:01:27 +01:00
parent b31c29a03d
commit 90865aeb8e
3 changed files with 52 additions and 4 deletions
+18
View File
@@ -0,0 +1,18 @@
package xmpp
import "testing"
func TestHandshake(t *testing.T) {
c := Component{
Host: "test.localhost",
Secret: "mypass",
}
streamID := "1263952298440005243"
expected := "c77e2ef0109fbbc5161e83b51629cd1353495332"
result := c.Handshake(streamID)
if result != expected {
t.Errorf("incorrect handshake calculation '%s' != '%s'", result, expected)
}
}