(t *testing.T)
| 609 | } |
| 610 | |
| 611 | func TestProjectItems_FieldTitle(t *testing.T) { |
| 612 | defer gock.Off() |
| 613 | gock.Observe(gock.DumpRequest) |
| 614 | |
| 615 | // list project items |
| 616 | gock.New("https://api.github.com"). |
| 617 | Post("/graphql"). |
| 618 | JSON(map[string]interface{}{ |
| 619 | "query": "query UserProjectWithItems.*", |
| 620 | "variables": map[string]interface{}{ |
| 621 | "firstItems": LimitMax, |
| 622 | "afterItems": nil, |
| 623 | "firstFields": LimitMax, |
| 624 | "afterFields": nil, |
| 625 | "login": "monalisa", |
| 626 | "number": 1, |
| 627 | }, |
| 628 | }). |
| 629 | Reply(200). |
| 630 | JSON(map[string]interface{}{ |
| 631 | "data": map[string]interface{}{ |
| 632 | "user": map[string]interface{}{ |
| 633 | "projectV2": map[string]interface{}{ |
| 634 | "items": map[string]interface{}{ |
| 635 | "nodes": []map[string]interface{}{ |
| 636 | { |
| 637 | "id": "draft issue ID", |
| 638 | "fieldValues": map[string]interface{}{ |
| 639 | "nodes": []map[string]interface{}{ |
| 640 | { |
| 641 | "__typename": "ProjectV2ItemFieldIterationValue", |
| 642 | "title": "Iteration Title 1", |
| 643 | "iterationId": "iterationId1", |
| 644 | }, |
| 645 | { |
| 646 | "__typename": "ProjectV2ItemFieldMilestoneValue", |
| 647 | "milestone": map[string]interface{}{ |
| 648 | "title": "Milestone Title 1", |
| 649 | }, |
| 650 | }, |
| 651 | }, |
| 652 | }, |
| 653 | }, |
| 654 | }, |
| 655 | }, |
| 656 | }, |
| 657 | }, |
| 658 | }, |
| 659 | }) |
| 660 | |
| 661 | client := NewTestClient() |
| 662 | |
| 663 | owner := &Owner{ |
| 664 | Type: "USER", |
| 665 | Login: "monalisa", |
| 666 | ID: "user ID", |
| 667 | } |
| 668 | project, err := client.ProjectItems(owner, 1, LimitMax, "") |
nothing calls this directly
no test coverage detected