Official cwtch.im peer implementation. https://cwtch.im
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

22 lines
507 B

package storage
import (
"cwtch.im/cwtch/peer"
"testing"
)
func TestFileProfileStore(t *testing.T) {
fileStore := CreateFileProfileStore(".test.json", "password")
alice := peer.NewCwtchPeer("alice")
fileStore.Save(alice)
aliceLoaded, err := fileStore.Load()
if err != nil {
t.Errorf("alice profile should have been loaded from store instead %v", err)
}
if aliceLoaded.GetProfile().Name != "alice" {
t.Errorf("alice profile should have been loaded from store instead %v", aliceLoaded)
}
}