summaryrefslogtreecommitdiffstats
path: root/spec/parser.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/parser.js')
-rw-r--r--spec/parser.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/parser.js b/spec/parser.js
index 70c1635..0f6ed31 100644
--- a/spec/parser.js
+++ b/spec/parser.js
@@ -84,6 +84,14 @@ describe('parser', function() {
equals(ast_for("{{> foo bar}}"), "{{> PARTIAL:foo ID:bar }}\n");
});
+ it('parses a partial with hash', function() {
+ equals(ast_for("{{> foo bar=bat}}"), "{{> PARTIAL:foo HASH{bar=ID:bat} }}\n");
+ });
+
+ it('parses a partial with context and hash', function() {
+ equals(ast_for("{{> foo bar bat=baz}}"), "{{> PARTIAL:foo ID:bar HASH{bat=ID:baz} }}\n");
+ });
+
it('parses a partial with a complex name', function() {
equals(ast_for("{{> shared/partial?.bar}}"), "{{> PARTIAL:shared/partial?.bar }}\n");
});