minimalNodes returns count comma-separated minimal JSON discussion nodes.
(count int)
| 59 | |
| 60 | // minimalNodes returns count comma-separated minimal JSON discussion nodes. |
| 61 | func minimalNodes(count int) string { |
| 62 | nodes := make([]string, count) |
| 63 | for i := range nodes { |
| 64 | nodes[i] = minimalNode(fmt.Sprintf("D%d", i+1), fmt.Sprintf("Discussion %d", i+1)) |
| 65 | } |
| 66 | return strings.Join(nodes, ",") |
| 67 | } |
| 68 | |
| 69 | // listResp builds a mock repository.discussions JSON response. |
| 70 | func listResp(hasNext bool, endCursor string, total int, nodes string) string { |
no test coverage detected