MCPcopy Create free account
hub / github.com/google/go-github / TestMarshalJSON_withNilContentAndSHA

Function TestMarshalJSON_withNilContentAndSHA

github/git_trees_test.go:18–31  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

16)
17
18func TestMarshalJSON_withNilContentAndSHA(t *testing.T) {
19 t.Parallel()
20 te := TreeEntry{
21 Path: Ptr("path"),
22 Mode: Ptr("mode"),
23 Type: Ptr("type"),
24 Size: Ptr(1),
25 URL: Ptr("url"),
26 }
27
28 want := `{"sha":null,"path":"path","mode":"mode","type":"type"}`
29 testJSONMarshalOnly(t, te, want)
30 testJSONMarshalOnly(t, &te, want)
31}
32
33func TestGitService_GetTree(t *testing.T) {
34 t.Parallel()

Callers

nothing calls this directly

Calls 2

testJSONMarshalOnlyFunction · 0.85
PtrFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…