forked from cwtch.im/cwtch
18 lines
346 B
Go
18 lines
346 B
Go
package peer
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestCwtchPeerGenerate(t *testing.T) {
|
|
|
|
alice := NewCwtchPeer("alice")
|
|
alice.Save("./test_profile")
|
|
|
|
aliceLoaded, err := LoadCwtchPeer("./test_profile")
|
|
if err != nil || aliceLoaded.Profile.Name != "alice" {
|
|
t.Errorf("something went wrong saving and loading profiles %v %v", err, aliceLoaded)
|
|
}
|
|
|
|
}
|