more tests

This commit is contained in:
Zack Scholl 2020-03-02 10:06:20 -08:00
parent eddf361893
commit 820225b684
1 changed files with 8 additions and 0 deletions

View File

@ -44,4 +44,12 @@ func TestEncryption(t *testing.T) {
dec, err = Decrypt(enc, key2)
assert.NotNil(t, err)
assert.NotEqual(t, msg, dec)
// error with no password
dec, err = Decrypt([]byte(""), key)
assert.NotNil(t, err)
// error with small password
_, _, err = New([]byte(""), nil)
assert.NotNil(t, err)
}