2018-03-11 18:49:10 +00:00
|
|
|
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
|
|
|
}
|