added nil check
This commit is contained in:
@ -40,12 +40,11 @@ func TestMessageEncryptDecrypt(t *testing.T) {
|
||||
|
||||
msg1, err := envelope.Open(prv2)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
t.Error(err)
|
||||
t.FailNow()
|
||||
}
|
||||
|
||||
if !bytes.Equal(msg1.Payload, data) {
|
||||
fmt.Println("encryption error. data did not match")
|
||||
t.FailNow()
|
||||
t.Error("encryption error. data did not match")
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user