MCPcopy Create free account
hub / github.com/dropbox/dbxcli / TestTeamJSONErrorWritesNoSuccessOutput

Function TestTeamJSONErrorWritesNoSuccessOutput

cmd/team_json_test.go:360–374  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

358}
359
360func TestTeamJSONErrorWritesNoSuccessOutput(t *testing.T) {
361 stubTeamClient(t, &mockTeamClient{
362 getInfoFn: func() (*team.TeamGetInfoResult, error) {
363 return nil, errors.New("team failed")
364 },
365 })
366
367 cmd, stdout := teamTestCmd(t, true)
368 if err := info(cmd, nil); err == nil {
369 t.Fatal("expected info error")
370 }
371 if got := stdout.String(); got != "" {
372 t.Fatalf("stdout = %q, want no success output", got)
373 }
374}
375
376func TestTeamCommandsSupportStructuredOutput(t *testing.T) {
377 for _, cmd := range []*cobra.Command{

Callers

nothing calls this directly

Calls 3

stubTeamClientFunction · 0.85
teamTestCmdFunction · 0.85
infoFunction · 0.85

Tested by

no test coverage detected