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

Function TestSearchRejectsExtraArgs

cmd/search_test.go:33–42  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

31}
32
33func TestSearchRejectsExtraArgs(t *testing.T) {
34 err := search(searchCmd, []string{"query", "/docs", "extra"})
35 if err == nil || !strings.Contains(err.Error(), "path-scope") {
36 t.Fatalf("error = %v, want extra path-scope error", err)
37 }
38 details := jsonErrorDetails(err)
39 if details["argument"] != "path-scope" || details["path"] != "extra" {
40 t.Fatalf("details = %#v, want extra path-scope argument path", details)
41 }
42}
43
44func TestSearchOrderByValidation(t *testing.T) {
45 cmd, _ := testSearchCmd()

Callers

nothing calls this directly

Calls 3

searchFunction · 0.85
jsonErrorDetailsFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected