(t *testing.T)
| 536 | } |
| 537 | |
| 538 | func Test_setRun_org(t *testing.T) { |
| 539 | tests := []struct { |
| 540 | name string |
| 541 | opts *SetOptions |
| 542 | wantVisibility shared.Visibility |
| 543 | wantRepositories []int64 |
| 544 | wantDependabotRepositories []string |
| 545 | wantApp string |
| 546 | }{ |
| 547 | { |
| 548 | name: "all vis", |
| 549 | opts: &SetOptions{ |
| 550 | OrgName: "UmbrellaCorporation", |
| 551 | Visibility: shared.All, |
| 552 | }, |
| 553 | wantApp: "actions", |
| 554 | }, |
| 555 | { |
| 556 | name: "selected visibility", |
| 557 | opts: &SetOptions{ |
| 558 | OrgName: "UmbrellaCorporation", |
| 559 | Visibility: shared.Selected, |
| 560 | RepositoryNames: []string{"birkin", "UmbrellaCorporation/wesker"}, |
| 561 | }, |
| 562 | wantRepositories: []int64{1, 2}, |
| 563 | wantApp: "actions", |
| 564 | }, |
| 565 | { |
| 566 | name: "no repos visibility", |
| 567 | opts: &SetOptions{ |
| 568 | OrgName: "UmbrellaCorporation", |
| 569 | Visibility: shared.Selected, |
| 570 | RepositoryNames: []string{}, |
| 571 | }, |
| 572 | wantRepositories: []int64{}, |
| 573 | wantApp: "actions", |
| 574 | }, |
| 575 | { |
| 576 | name: "Dependabot", |
| 577 | opts: &SetOptions{ |
| 578 | OrgName: "UmbrellaCorporation", |
| 579 | Visibility: shared.All, |
| 580 | Application: shared.Dependabot, |
| 581 | }, |
| 582 | wantApp: "dependabot", |
| 583 | }, |
| 584 | { |
| 585 | name: "Dependabot selected visibility", |
| 586 | opts: &SetOptions{ |
| 587 | OrgName: "UmbrellaCorporation", |
| 588 | Visibility: shared.Selected, |
| 589 | Application: shared.Dependabot, |
| 590 | RepositoryNames: []string{"birkin", "UmbrellaCorporation/wesker"}, |
| 591 | }, |
| 592 | wantDependabotRepositories: []string{"1", "2"}, |
| 593 | wantApp: "dependabot", |
| 594 | }, |
| 595 | { |
nothing calls this directly
no test coverage detected