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)
| 624 | // - `NO_STATUS_ITEM`: emulates this issue is on a project but is not given a status |
| 625 | // - `DONE_STATUS_ITEM`: emulates this issue is on a project and considered done |
| 626 | func mockV2ProjectItems(t *testing.T, r *httpmock.Registry) { |
| 627 | r.Register(httpmock.GraphQL(`query IssueProjectItems\b`), httpmock.StringResponse(` |
| 628 | { "data": { "repository": { "issue": { |
| 629 | "projectItems": { |
| 630 | "totalCount": 2, |
| 631 | "nodes": [ |
| 632 | { |
| 633 | "id": "NO_STATUS_ITEM", |
| 634 | "project": { |
| 635 | "id": "PROJECT1", |
| 636 | "title": "v2 Project 1" |
| 637 | }, |
| 638 | "status": { |
| 639 | "optionId": "", |
| 640 | "name": "" |
| 641 | } |
| 642 | }, |
| 643 | { |
| 644 | "id": "DONE_STATUS_ITEM", |
| 645 | "project": { |
| 646 | "id": "PROJECT2", |
| 647 | "title": "v2 Project 2" |
| 648 | }, |
| 649 | "status": { |
| 650 | "optionId": "PROJECTITEMFIELD1", |
| 651 | "name": "Done" |
| 652 | } |
| 653 | } |
| 654 | ] |
| 655 | } } } } } |
| 656 | `)) |
| 657 | } |
| 658 | |
| 659 | // issueResponseAllIssues2Fields returns a GraphQL response for an issue with all Issues 2.0 fields populated. |
| 660 | func issueResponseAllIssues2Fields() string { |
no test coverage detected