cwtch/peer/cwtch_peer_test.go

16 lines
372 B
Go
Raw Normal View History

package peer
2018-03-09 20:44:13 +00:00
import (
"testing"
)
func TestCwtchPeerGenerate(t *testing.T) {
sarah := NewCwtchPeer("sarah")
2018-03-12 18:43:51 +00:00
sarah.Save("./test_profile")
sarahLoaded, err := LoadCwtchPeer("./test_profile")
2018-03-09 20:44:13 +00:00
if err != nil || sarahLoaded.Profile.Name != "sarah" {
t.Errorf("something went wrong saving and loading profiles %v %v", err, sarahLoaded)
}
2018-03-12 18:43:51 +00:00
//t.Logf("%v", sarahLoaded)
2018-03-09 20:44:13 +00:00
}