TestSheetFrontMatterFailure asserts that an error is returned if the sheet's frontmatter cannot be parsed.
(t *testing.T)
| 75 | // TestSheetFrontMatterFailure asserts that an error is returned if the sheet's |
| 76 | // frontmatter cannot be parsed. |
| 77 | func TestSheetFrontMatterFailure(t *testing.T) { |
| 78 | |
| 79 | // initialize a sheet |
| 80 | _, err := New( |
| 81 | "foo", |
| 82 | "community", |
| 83 | mocks.Path("sheet/bad-fm"), |
| 84 | []string{"alpha", "bravo"}, |
| 85 | false, |
| 86 | ) |
| 87 | if err == nil { |
| 88 | t.Errorf("failed to return an error on malformed front-matter") |
| 89 | } |
| 90 | } |