Reorg
This commit is contained in:
21
client/identity_test.go
Normal file
21
client/identity_test.go
Normal 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.")
|
||||
}
|
Reference in New Issue
Block a user