(t *testing.T)
| 397 | } |
| 398 | |
| 399 | func Test_RepoClone_noParent_noUpstream(t *testing.T) { |
| 400 | reg := &httpmock.Registry{} |
| 401 | defer reg.Verify(t) |
| 402 | reg.Register( |
| 403 | httpmock.GraphQL(`query RepositoryInfo\b`), |
| 404 | httpmock.StringResponse(` |
| 405 | { "data": { "repository": { |
| 406 | "name": "REPO", |
| 407 | "owner": { |
| 408 | "login": "OWNER" |
| 409 | } |
| 410 | } } } |
| 411 | `)) |
| 412 | |
| 413 | httpClient := &http.Client{Transport: reg} |
| 414 | |
| 415 | cs, cmdTeardown := run.Stub() |
| 416 | defer cmdTeardown(t) |
| 417 | |
| 418 | cs.Register(`git clone https://github.com/OWNER/REPO.git`, 0, "") |
| 419 | |
| 420 | _, err := runCloneCommand(httpClient, "OWNER/REPO --no-upstream") |
| 421 | if err != nil { |
| 422 | t.Fatalf("error running command `repo clone`: %v", err) |
| 423 | } |
| 424 | } |
| 425 | |
| 426 | func TestSimplifyURL(t *testing.T) { |
| 427 | tests := []struct { |
nothing calls this directly
no test coverage detected