This commit is contained in:
ycc
2022-09-06 09:30:45 +02:00
parent 86f222a7df
commit 37fadc5bb3
16 changed files with 944 additions and 619 deletions

21
client/identity_test.go Normal file
View File

@ -0,0 +1,21 @@
package client
import (
"log"
"testing"
"github.com/stretchr/testify/assert"
)
func TestCreate(t *testing.T) {
id := CreateIdentity("myname")
id.Save("test.id")
}
func TestLoad(t *testing.T) {
id, err := LoadIdentity("test.id")
if err != nil {
log.Println(err.Error())
}
assert.Equal(t, id.Nickname, "myname", "The two words should be the same.")
}