MCPcopy Index your code
hub / github.com/google/go-github / TestProjectsService_GetOrganizationProjectItem

Function TestProjectsService_GetOrganizationProjectItem

github/projects_test.go:841–857  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

839}
840
841func TestProjectsService_GetOrganizationProjectItem(t *testing.T) {
842 t.Parallel()
843 client, mux, _ := setup(t)
844 mux.HandleFunc("/orgs/o/projectsV2/1/items/17", func(w http.ResponseWriter, r *http.Request) {
845 testMethod(t, r, "GET")
846 fmt.Fprint(w, `{"id":17,"node_id":"PVTI_node"}`)
847 })
848 ctx := t.Context()
849 opts := &GetProjectItemOptions{}
850 item, _, err := client.Projects.GetOrganizationProjectItem(ctx, "o", 1, 17, opts)
851 if err != nil {
852 t.Fatalf("GetOrganizationProjectItem error: %v", err)
853 }
854 if item.GetID() != 17 {
855 t.Fatalf("unexpected item: %+v", item)
856 }
857}
858
859func TestProjectsService_GetOrganizationProjectItem_error(t *testing.T) {
860 t.Parallel()

Callers

nothing calls this directly

Calls 4

testMethodFunction · 0.85
setupFunction · 0.70
GetIDMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…