Error for unknown blocks

This commit is contained in:
Kyle Fuller
2015-10-24 14:24:34 -07:00
parent 5883775f37
commit 1ea58b70f3
2 changed files with 14 additions and 2 deletions

View File

@@ -44,4 +44,12 @@ describe("TokenParser") {
let nodes = try parser.parse()
try expect(nodes.count) == 1
}
$0.it("errors when parsing an unknown tag") {
let parser = TokenParser(tokens: [
Token.Block(value: "unknown"),
])
try expect(try parser.parse()).toThrow(TemplateSyntaxError("Unknown template tag 'unknown'"))
}
}