diff options
author | Abdülhamit Yilmaz <mr.yilmaz@gmx.de> | 2015-03-17 22:13:00 +0300 |
---|---|---|
committer | Abdülhamit Yilmaz <mr.yilmaz@gmx.de> | 2015-03-17 22:13:00 +0300 |
commit | 79d187a21279d71387bb658b31836d1b225726ad (patch) | |
tree | c3f6819ceb9406c4b66d454a55e5316b3faf3e2e /securecookie_test.go | |
parent | 5ce09b9e8fa7c321ae9de4ad85f08a1b372e9fdf (diff) |
Add TestMissingKey
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 { |