TestFilterFailure asserts that an error is returned when a non-existent cheatpath is requested
(t *testing.T)
| 37 | // TestFilterFailure asserts that an error is returned when a non-existent |
| 38 | // cheatpath is requested |
| 39 | func TestFilterFailure(t *testing.T) { |
| 40 | |
| 41 | // init cheatpaths |
| 42 | paths := []Path{ |
| 43 | Path{Name: "foo"}, |
| 44 | Path{Name: "bar"}, |
| 45 | Path{Name: "baz"}, |
| 46 | } |
| 47 | |
| 48 | // filter the paths |
| 49 | _, err := Filter(paths, "qux") |
| 50 | if err == nil { |
| 51 | t.Errorf("failed to return an error on non-existent cheatpath") |
| 52 | } |
| 53 | } |