16 lines
368 B
Go
16 lines
368 B
Go
|
package client
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestCwtchPeerGenerate(t *testing.T) {
|
||
|
sarah := NewCwtchPeer("sarah")
|
||
|
sarah.Save("test_profile")
|
||
|
sarahLoaded, err := LoadCwtchPeer("test_profile")
|
||
|
if err != nil || sarahLoaded.Profile.Name != "sarah" {
|
||
|
t.Errorf("something went wrong saving and loading profiles %v %v", err, sarahLoaded)
|
||
|
}
|
||
|
t.Logf("%v", sarahLoaded)
|
||
|
}
|