diff options
Diffstat (limited to 'securecookie_test.go')
-rw-r--r-- | securecookie_test.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/securecookie_test.go b/securecookie_test.go index fe0cdb1..381320d 100644 --- a/securecookie_test.go +++ b/securecookie_test.go @@ -157,6 +157,16 @@ func TestMultiNoCodecs(t *testing.T) { } } +func TestMissingKey(t *testing.T) { + s1 := New(nil, nil) + + var dst []byte + err := s1.Decode("sid", "value", &dst) + if err != errHashKeyNotSet { + t.Fatalf("Expected %#v, got %#v", errHashKeyNotSet, err) + } +} + // ---------------------------------------------------------------------------- type FooBar struct { |