package securecookie import "testing" func TestUnsafeCodec(t *testing.T) { c := NewUnsafeCodec() str := `TestUnsafeCodec` encoded, err := c.Encode(`name`, str) if err != nil { t.Error(err) } var decoded string err = c.Decode(`name`, encoded, &decoded) if err != nil { t.Error(err) } if decoded != str { t.Fatalf("expected %s, got: %#v", str, decoded) } }