mockV2ProjectItems registers GraphQL queries to report an issue on multiple v2 projects in various states - `NO_STATUS_ITEM`: emulates this issue is on a project but is not given a status - `DONE_STATUS_ITEM`: emulates this issue is on a project and considered done
(t *testing.T, r *httpmock.Registry)
| 612 | // - `NO_STATUS_ITEM`: emulates this issue is on a project but is not given a status |
| 613 | // - `DONE_STATUS_ITEM`: emulates this issue is on a project and considered done |
| 614 | func mockV2ProjectItems(t *testing.T, r *httpmock.Registry) { |
| 615 | r.Register(httpmock.GraphQL(`query IssueProjectItems\b`), httpmock.StringResponse(` |
| 616 | { "data": { "repository": { "issue": { |
| 617 | "projectItems": { |
| 618 | "totalCount": 2, |
| 619 | "nodes": [ |
| 620 | { |
| 621 | "id": "NO_STATUS_ITEM", |
| 622 | "project": { |
| 623 | "id": "PROJECT1", |
| 624 | "title": "v2 Project 1" |
| 625 | }, |
| 626 | "status": { |
| 627 | "optionId": "", |
| 628 | "name": "" |
| 629 | } |
| 630 | }, |
| 631 | { |
| 632 | "id": "DONE_STATUS_ITEM", |
| 633 | "project": { |
| 634 | "id": "PROJECT2", |
| 635 | "title": "v2 Project 2" |
| 636 | }, |
| 637 | "status": { |
| 638 | "optionId": "PROJECTITEMFIELD1", |
| 639 | "name": "Done" |
| 640 | } |
| 641 | } |
| 642 | ] |
| 643 | } } } } } |
| 644 | `)) |
| 645 | } |
| 646 | |
| 647 | // issueResponseAllIssues2Fields returns a GraphQL response for an issue with all Issues 2.0 fields populated. |
| 648 | func issueResponseAllIssues2Fields() string { |
no test coverage detected