From d515f6dca54f04d718d41c7bc39165daa92dde34 Mon Sep 17 00:00:00 2001 From: David Hontecillas Date: Wed, 1 Nov 2023 11:37:17 +0100 Subject: [PATCH] try to reproduce issue of empty array returning an error Signed-off-by: David Hontecillas --- jose_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jose_test.go b/jose_test.go index 604fdca..1fc4633 100644 --- a/jose_test.go +++ b/jose_test.go @@ -320,6 +320,7 @@ func TestCalculateHeadersToPropagate(t *testing.T) { {"d.d", "x-d"}, {"d.d.c", "x-e"}, {"d.f", "x-f"}, + {"g", "x-g"}, }, claims: map[string]interface{}{ "a": 1, @@ -335,6 +336,7 @@ func TestCalculateHeadersToPropagate(t *testing.T) { "c": []interface{}{"one", "two"}, }, }, + "g": []interface{}{}, }, expected: map[string]string{ "x-a": "1", @@ -343,6 +345,7 @@ func TestCalculateHeadersToPropagate(t *testing.T) { "x-d": `{"a":1,"b":"foo","c":["one","two"]}`, "x-e": "one,two", "x-f": "", + "x-g": "", }, }, } {