(handler http.Handler)
| 11 | ) |
| 12 | |
| 13 | func 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 | |
| 22 | func TestAuthorizeURL(t *testing.T) { |
| 23 | client := &Client{ |
no test coverage detected