MCPcopy Create free account
hub / github.com/algolia/cli / newTestClient

Function newTestClient

api/dashboard/client_test.go:13–20  ·  view source on GitHub ↗
(handler http.Handler)

Source from the content-addressed store, hash-verified

11)
12
13func newTestClient(handler http.Handler) (*httptest.Server, *Client) {
14 ts := httptest.NewServer(handler)
15 client := NewClientWithHTTPClient("test-client-id", ts.Client())
16 client.DashboardURL = ts.URL
17 client.APIURL = ts.URL
18 client.OAuthScope = "scope:test"
19 return ts, client
20}
21
22func TestAuthorizeURL(t *testing.T) {
23 client := &Client{

Calls 1

NewClientWithHTTPClientFunction · 0.70

Tested by

no test coverage detected