TestLoadBadPath asserts that an error is returned if a cheatpath is invalid
(t *testing.T)
| 52 | |
| 53 | // TestLoadBadPath asserts that an error is returned if a cheatpath is invalid |
| 54 | func TestLoadBadPath(t *testing.T) { |
| 55 | |
| 56 | // mock a bad cheatpath |
| 57 | cheatpaths := []cheatpath.Path{ |
| 58 | { |
| 59 | Name: "badpath", |
| 60 | Path: "/cheat/test/path/does/not/exist", |
| 61 | ReadOnly: true, |
| 62 | }, |
| 63 | } |
| 64 | |
| 65 | // attempt to load the cheatpath |
| 66 | if _, err := Load(cheatpaths); err == nil { |
| 67 | t.Errorf("failed to reject invalid cheatpath") |
| 68 | } |
| 69 | } |