spegel/pkg/httpx/header_test.go
Philip Laine e092c5c2b8
Refactor OCI client options and add header configuration
Signed-off-by: Philip Laine <philip.laine@gmail.com>
2025-06-11 10:57:48 +02:00

21 lines
298 B
Go

package httpx
import (
"net/http"
"testing"
"github.com/stretchr/testify/require"
)
func TestCopyHeader(t *testing.T) {
t.Parallel()
src := http.Header{
"foo": []string{"2", "1"},
}
dst := http.Header{}
CopyHeader(dst, src)
require.Equal(t, []string{"2", "1"}, dst.Values("foo"))
}