2018-03-31 19:33:32 +00:00
|
|
|
package testing
|
2018-03-30 21:16:51 +00:00
|
|
|
|
|
|
|
import (
|
2018-04-02 21:10:29 +00:00
|
|
|
"git.mascherari.press/cwtch/peer"
|
2018-03-30 21:16:51 +00:00
|
|
|
"testing"
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestCwtchPeerIntegration(t *testing.T) {
|
2018-03-31 19:33:32 +00:00
|
|
|
alice := peer.NewCwtchPeer("Alice")
|
2018-03-30 21:16:51 +00:00
|
|
|
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)
|
|
|
|
}
|