(t *testing.T)
| 705 | } |
| 706 | |
| 707 | func TestDisplayName(t *testing.T) { |
| 708 | tests := []struct { |
| 709 | name string |
| 710 | assignee AssignableUser |
| 711 | want string |
| 712 | }{ |
| 713 | { |
| 714 | name: "assignee with name", |
| 715 | assignee: AssignableUser{"123", "octocat123", "Octavious Cath"}, |
| 716 | want: "octocat123 (Octavious Cath)", |
| 717 | }, |
| 718 | { |
| 719 | name: "assignee without name", |
| 720 | assignee: AssignableUser{"123", "octocat123", ""}, |
| 721 | want: "octocat123", |
| 722 | }, |
| 723 | } |
| 724 | for _, tt := range tests { |
| 725 | actual := tt.assignee.DisplayName() |
| 726 | if actual != tt.want { |
| 727 | t.Errorf("display name was %s wanted %s", actual, tt.want) |
| 728 | } |
| 729 | } |
| 730 | } |
| 731 | |
| 732 | func TestActorDisplayName(t *testing.T) { |
| 733 | tests := []struct { |
nothing calls this directly
no test coverage detected