Skip to content

Commit

Permalink
Minimal testing on errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Rene Kroon committed Apr 11, 2021
1 parent a2a8645 commit 265e283
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions evictionreason_enumer_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package ttlcache

import (
"testing"

"github.com/stretchr/testify/assert"
)

func TestError(t *testing.T) {
assert.Equal(t, "key not found", ErrNotFound.Error())

}

func TestEvictionError(t *testing.T) {
assert.Equal(t, "Removed", Removed.String())
assert.Equal(t, "Expired", Expired.String())

}

0 comments on commit 265e283

Please sign in to comment.