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

Function TestSearchPathScopeValidation

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

Source from the content-addressed store, hash-verified

20}
21
22func TestSearchPathScopeValidation(t *testing.T) {
23 err := search(searchCmd, []string{"query", "no-slash"})
24 if err == nil {
25 t.Fatal("expected error for path-scope without leading slash")
26 }
27 details := jsonErrorDetails(err)
28 if details["argument"] != "path-scope" || details["path"] != "no-slash" {
29 t.Fatalf("details = %#v, want path-scope argument and path", details)
30 }
31}
32
33func TestSearchRejectsExtraArgs(t *testing.T) {
34 err := search(searchCmd, []string{"query", "/docs", "extra"})

Callers

nothing calls this directly

Calls 2

searchFunction · 0.85
jsonErrorDetailsFunction · 0.85

Tested by

no test coverage detected