(t *testing.T)
| 1717 | } |
| 1718 | |
| 1719 | func TestIssueCreate_metadata(t *testing.T) { |
| 1720 | http := &httpmock.Registry{} |
| 1721 | defer http.Verify(t) |
| 1722 | |
| 1723 | http.StubIssueRepoInfoResponse("OWNER", "REPO") |
| 1724 | http.Register( |
| 1725 | httpmock.GraphQL(`query RepositoryLabelList\b`), |
| 1726 | httpmock.StringResponse(` |
| 1727 | { "data": { "repository": { "labels": { |
| 1728 | "nodes": [ |
| 1729 | { "name": "TODO", "id": "TODOID" }, |
| 1730 | { "name": "bug", "id": "BUGID" } |
| 1731 | ], |
| 1732 | "pageInfo": { "hasNextPage": false } |
| 1733 | } } } } |
| 1734 | `)) |
| 1735 | http.Register( |
| 1736 | httpmock.GraphQL(`query RepositoryMilestoneList\b`), |
| 1737 | httpmock.StringResponse(` |
| 1738 | { "data": { "repository": { "milestones": { |
| 1739 | "nodes": [ |
| 1740 | { "title": "GA", "id": "GAID" }, |
| 1741 | { "title": "Big One.oh", "id": "BIGONEID" } |
| 1742 | ], |
| 1743 | "pageInfo": { "hasNextPage": false } |
| 1744 | } } } } |
| 1745 | `)) |
| 1746 | http.Register( |
| 1747 | httpmock.GraphQL(`query RepositoryProjectList\b`), |
| 1748 | httpmock.StringResponse(` |
| 1749 | { "data": { "repository": { "projects": { |
| 1750 | "nodes": [ |
| 1751 | { "name": "Cleanup", "id": "CLEANUPID" }, |
| 1752 | { "name": "Roadmap", "id": "ROADMAPID" } |
| 1753 | ], |
| 1754 | "pageInfo": { "hasNextPage": false } |
| 1755 | } } } } |
| 1756 | `)) |
| 1757 | http.Register( |
| 1758 | httpmock.GraphQL(`query OrganizationProjectList\b`), |
| 1759 | httpmock.StringResponse(` |
| 1760 | { "data": { "organization": null }, |
| 1761 | "errors": [{ |
| 1762 | "type": "NOT_FOUND", |
| 1763 | "path": [ "organization" ], |
| 1764 | "message": "Could not resolve to an Organization with the login of 'OWNER'." |
| 1765 | }] |
| 1766 | } |
| 1767 | `)) |
| 1768 | http.Register( |
| 1769 | httpmock.GraphQL(`query RepositoryProjectV2List\b`), |
| 1770 | httpmock.StringResponse(` |
| 1771 | { "data": { "repository": { "projectsV2": { |
| 1772 | "nodes": [], |
| 1773 | "pageInfo": { "hasNextPage": false } |
| 1774 | } } } } |
| 1775 | `)) |
| 1776 | http.Register( |
nothing calls this directly
no test coverage detected