package client_test
import (
"encoding/json"
"testing"
"github.com/stretchr/testify/assert"
"github.com/vmware/dispatch/pkg/client"
)
const (
testOrgID = "testOrg"
)
func TestDefaultClient(t *testing.T) {
transport := client.DefaultHTTPClient("https://example.com", "v1/somepath")
assert.NotNil(t, transport)
}
func toMap(t *testing.T, val interface{}) map[string]interface{} {
t.Helper()
body, err := json.Marshal(val)
assert.NoError(t, err)
var ret map[string]interface{}
assert.NoError(t, json.Unmarshal(body, &ret))
return ret
}