diff options
author | Kamil Kisiel <kamil@kamilkisiel.net> | 2013-10-17 21:33:57 +0400 |
---|---|---|
committer | Kamil Kisiel <kamil@kamilkisiel.net> | 2013-10-17 21:33:57 +0400 |
commit | 155134204c034796bcd7a72c1e1b53ba005735c6 (patch) | |
tree | 55bd8c60e047c352c881b6c66af76c341426d666 /securecookie_test.go | |
parent | 6186150e83a63fbc943913bc96d4528460d79a28 (diff) |
Better errors for {En,De}codeMulti.
Diffstat (limited to 'securecookie_test.go')
-rw-r--r-- | securecookie_test.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/securecookie_test.go b/securecookie_test.go index 099c290..fe0cdb1 100644 --- a/securecookie_test.go +++ b/securecookie_test.go @@ -144,6 +144,19 @@ func TestMultiError(t *testing.T) { } } +func TestMultiNoCodecs(t *testing.T) { + _, err := EncodeMulti("foo", "bar") + if err != errNoCodecs { + t.Errorf("EncodeMulti: bad value for error, got: %v", err) + } + + var dst []byte + err = DecodeMulti("foo", "bar", &dst) + if err != errNoCodecs { + t.Errorf("DecodeMulti: bad value for error, got: %v", err) + } +} + // ---------------------------------------------------------------------------- type FooBar struct { |