(t *testing.T)
| 31 | } |
| 32 | |
| 33 | func 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 | |
| 44 | func TestSearchOrderByValidation(t *testing.T) { |
| 45 | cmd, _ := testSearchCmd() |
nothing calls this directly
no test coverage detected