(t *testing.T)
| 799 | } |
| 800 | |
| 801 | func TestDisplayName(t *testing.T) { |
| 802 | tests := []struct { |
| 803 | name string |
| 804 | assignee AssignableUser |
| 805 | want string |
| 806 | }{ |
| 807 | { |
| 808 | name: "assignee with name", |
| 809 | assignee: AssignableUser{"123", "octocat123", "Octavious Cath"}, |
| 810 | want: "octocat123 (Octavious Cath)", |
| 811 | }, |
| 812 | { |
| 813 | name: "assignee without name", |
| 814 | assignee: AssignableUser{"123", "octocat123", ""}, |
| 815 | want: "octocat123", |
| 816 | }, |
| 817 | } |
| 818 | for _, tt := range tests { |
| 819 | actual := tt.assignee.DisplayName() |
| 820 | if actual != tt.want { |
| 821 | t.Errorf("display name was %s wanted %s", actual, tt.want) |
| 822 | } |
| 823 | } |
| 824 | } |
| 825 | |
| 826 | func TestActorDisplayName(t *testing.T) { |
| 827 | tests := []struct { |
nothing calls this directly
no test coverage detected