Fix JSON flag test comments · Entire
Fix JSON flag test comments
2c1573e→main·
gtrrz-victor·1w ago·2 files·+4 added/-4 removed
Sessions
01KX30NRD362VH2XBWHZAQGV94View transcript
[?
ship itCodex·GPT-5.5·4 steps](/content/gh/entireio/cli/session/019f45f8-6e78-75a3-8283-aca706c52aa6#timeline-01KX30NRD362VH2XBWHZAQGV94/index.html)
Changes
2
cmd/entire/cli
Mcorecmd_list_test.go+2/-2
Mcorecmd_mutation_test.go+2/-2
37 unmodified lines
38
39
40
41
42
41
42
43
44
45
37 unmodified lines
// Not parallel: runCoreCmd swaps the package-level activeCoreClient seam.
func TestRunCoreList_EmptyJSONIsArray(t *testing.T) {
srv := serveOrgList(t, nil)
// org list's --json is persistent on the group root, so drive the full
// group command with "list" as a subcommand arg.
// Drive the full group command so the test covers Cobra's command-tree
// wiring as well as the leaf's local --json flag.
out, _, err := runCoreCmd(t, newOrgCmd, srv.URL, "list", "--json")
require.NoError(t, err)
require.JSONEq(t, "[]", out, "empty --json list must be [], not null")
}
Mcmd/entire/cli/corecmd_list_test.go+2/-2
40 unmodified lines
41
42
43
44
45
44
45
46
47
48
40 unmodified lines
// Not parallel: runCoreCmd swaps the package-level activeCoreClient seam.
func TestOrgCreate_JSONOnRequest(t *testing.T) {
srv := newCreateOrgServer(t)
// org create's --json is persistent on the group root, so drive the
// full group command with "create" as a subcommand arg.
// Drive the full group command so the test covers Cobra's command-tree
// wiring as well as the leaf's local --json flag.
out, _, err := runCoreCmd(t, newOrgCmd, srv.URL, "create", "acme", "--json")
require.NoError(t, err)
require.Contains(t, out, `"name": "acme"`)
}
Mcmd/entire/cli/corecmd_mutation_test.go+2/-2