MCPcopy Create free account
hub / github.com/cli/cli / TestRunList_FieldColumn

Function TestRunList_FieldColumn

pkg/cmd/project/item-list/item_list_test.go:774–919  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

772}
773
774func TestRunList_FieldColumn(t *testing.T) {
775 defer gock.Off()
776
777 // get user ID
778 gock.New("https://api.github.com").
779 Post("/graphql").
780 MatchType("json").
781 JSON(map[string]any{
782 "query": "query UserOrgOwner.*",
783 "variables": map[string]any{
784 "login": "monalisa",
785 },
786 }).
787 Reply(200).
788 JSON(map[string]any{
789 "data": map[string]any{
790 "user": map[string]any{
791 "id": "an ID",
792 },
793 },
794 "errors": []any{
795 map[string]any{
796 "type": "NOT_FOUND",
797 "path": []string{"organization"},
798 },
799 },
800 })
801
802 // list project items with fields
803 gock.New("https://api.github.com").
804 Post("/graphql").
805 Reply(200).
806 JSON(map[string]any{
807 "data": map[string]any{
808 "user": map[string]any{
809 "projectV2": map[string]any{
810 "fields": map[string]any{
811 "nodes": []map[string]any{
812 {
813 "__typename": "ProjectV2SingleSelectField",
814 "id": "status ID",
815 "name": "Status",
816 "dataType": "SINGLE_SELECT",
817 },
818 {
819 "__typename": "ProjectV2Field",
820 "id": "est ID",
821 "name": "Est",
822 "dataType": "NUMBER",
823 },
824 {
825 "__typename": "ProjectV2Field",
826 "id": "tags ID",
827 "name": "Tags",
828 "dataType": "LABELS",
829 },
830 {
831 "__typename": "ProjectV2IterationField",

Callers

nothing calls this directly

Calls 7

NewTestClientFunction · 0.92
TestFunction · 0.92
ReplyMethod · 0.80
SetStdoutTTYMethod · 0.80
EqualMethod · 0.80
runListFunction · 0.70
StringMethod · 0.65

Tested by

no test coverage detected