aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbdülhamit Yilmaz <mr.yilmaz@gmx.de>2015-03-17 22:13:00 +0300
committerAbdülhamit Yilmaz <mr.yilmaz@gmx.de>2015-03-17 22:13:00 +0300
commit79d187a21279d71387bb658b31836d1b225726ad (patch)
treec3f6819ceb9406c4b66d454a55e5316b3faf3e2e
parent5ce09b9e8fa7c321ae9de4ad85f08a1b372e9fdf (diff)
Add TestMissingKey
-rw-r--r--securecookie_test.go10
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 {