Skip to content

Commit 265e283

Browse files
author
Rene Kroon
committed
Minimal testing on errors
1 parent a2a8645 commit 265e283

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

evictionreason_enumer_test.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package ttlcache
2+
3+
import (
4+
"testing"
5+
6+
"github.com/stretchr/testify/assert"
7+
)
8+
9+
func TestError(t *testing.T) {
10+
assert.Equal(t, "key not found", ErrNotFound.Error())
11+
12+
}
13+
14+
func TestEvictionError(t *testing.T) {
15+
assert.Equal(t, "Removed", Removed.String())
16+
assert.Equal(t, "Expired", Expired.String())
17+
18+
}

0 commit comments

Comments
 (0)