mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2024-12-17 22:12:01 -08:00
23 lines
423 B
Go
23 lines
423 B
Go
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)
|
|
}
|
|
}
|
|
|
|
func TestGenerateHandshake(t *testing.T) {
|
|
// TODO
|
|
}
|