From 155134204c034796bcd7a72c1e1b53ba005735c6 Mon Sep 17 00:00:00 2001 From: Kamil Kisiel Date: Thu, 17 Oct 2013 10:33:57 -0700 Subject: Better errors for {En,De}codeMulti. --- securecookie_test.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'securecookie_test.go') 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 { -- cgit v1.2.3