(t *testing.T)
| 788 | } |
| 789 | |
| 790 | func TestDisplayName(t *testing.T) { |
| 791 | tests := []struct { |
| 792 | name string |
| 793 | assignee AssignableUser |
| 794 | want string |
| 795 | }{ |
| 796 | { |
| 797 | name: "assignee with name", |
| 798 | assignee: AssignableUser{"123", "octocat123", "Octavious Cath"}, |
| 799 | want: "octocat123 (Octavious Cath)", |
| 800 | }, |
| 801 | { |
| 802 | name: "assignee without name", |
| 803 | assignee: AssignableUser{"123", "octocat123", ""}, |
| 804 | want: "octocat123", |
| 805 | }, |
| 806 | } |
| 807 | for _, tt := range tests { |
| 808 | actual := tt.assignee.DisplayName() |
| 809 | if actual != tt.want { |
| 810 | t.Errorf("display name was %s wanted %s", actual, tt.want) |
| 811 | } |
| 812 | } |
| 813 | } |
| 814 | |
| 815 | func TestActorDisplayName(t *testing.T) { |
| 816 | tests := []struct { |
nothing calls this directly
no test coverage detected