Skip to content

Commit

Permalink
inclease more test coverage with covering Encrypt without SetCryptKey b…
Browse files Browse the repository at this point in the history
  • Loading branch information
u5surf committed Sep 19, 2019
1 parent 003ea77 commit e1f4be4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cryptkeeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ func TestCryptSetup(t *testing.T) {

func TestCryptString(t *testing.T) {

t.Run("Invalid encrypt without SetCryptKey", func(t *testing.T) {
_, err := Encrypt("abc")
if err == nil {
t.Fatalf("Encrypt without SetCryptKey should have errored: '%s'", err)
}
})
t.Run("Encrypt/Valid", func(t *testing.T) {
err := SetCryptKey([]byte("12345678901234567890123456789012"))
if err != nil {
Expand Down

0 comments on commit e1f4be4

Please # to comment.