meowlib/client/identity_test.go
2022-09-06 09:30:45 +02:00

22 lines
364 B
Go

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.")
}