forked from cwtch.im/cwtch
22 lines
577 B
Go
22 lines
577 B
Go
package peer
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestCwtchPeerIntegration(t *testing.T) {
|
|
alice := NewCwtchPeer("Alice")
|
|
id, _ := alice.Profile.StartGroup("ylhbhtypevo4ympq")
|
|
alice.Profile.AddContact(alice.Profile.Onion, alice.Profile.PublicProfile)
|
|
alice.JoinServer("ylhbhtypevo4ympq")
|
|
// time.Sleep(time.Second *5)
|
|
alice.SendMessageToGroup(id, "Hello")
|
|
alice.SendMessageToGroup(id, "My")
|
|
alice.SendMessageToGroup(id, "Name Is")
|
|
alice.SendMessageToGroup(id, "ALICE!!!")
|
|
time.Sleep(time.Second * 5)
|
|
group := alice.Profile.Groups[id]
|
|
t.Logf("%v", group.Timeline)
|
|
}
|