TestSheetFailure asserts that an error is returned if the sheet cannot be read
(t *testing.T)
| 58 | // TestSheetFailure asserts that an error is returned if the sheet cannot be |
| 59 | // read |
| 60 | func TestSheetFailure(t *testing.T) { |
| 61 | |
| 62 | // initialize a sheet |
| 63 | _, err := New( |
| 64 | "foo", |
| 65 | "community", |
| 66 | mocks.Path("/does-not-exist"), |
| 67 | []string{"alpha", "bravo"}, |
| 68 | false, |
| 69 | ) |
| 70 | if err == nil { |
| 71 | t.Errorf("failed to return an error on unreadable sheet") |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | // TestSheetFrontMatterFailure asserts that an error is returned if the sheet's |
| 76 | // frontmatter cannot be parsed. |