summaryrefslogtreecommitdiffstats
path: root/spec/qunit_spec.js
diff options
context:
space:
mode:
authorYehuda Katz <wycats@gmail.com>2012-12-23 20:29:36 -0800
committerYehuda Katz <wycats@gmail.com>2012-12-23 20:29:36 -0800
commitbf4c813db03bbc3ab63e33256d7a6824cbd35e57 (patch)
tree7957c5ae1a54dea6ca8fbf5cd08cc037765ed560 /spec/qunit_spec.js
parent070e12f76f251fc038956f61f132dec99a898cd2 (diff)
parentb58c2dd0ad9b3454c2f1b39e5680d473693514f9 (diff)
downloadhandlebars.js-bf4c813db03bbc3ab63e33256d7a6824cbd35e57.zip
handlebars.js-bf4c813db03bbc3ab63e33256d7a6824cbd35e57.tar.gz
handlebars.js-bf4c813db03bbc3ab63e33256d7a6824cbd35e57.tar.bz2
Merge pull request #389 from leshill/partial_names
Partials can be paths
Diffstat (limited to 'spec/qunit_spec.js')
-rw-r--r--spec/qunit_spec.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/spec/qunit_spec.js b/spec/qunit_spec.js
index dcb7150..6e52865 100644
--- a/spec/qunit_spec.js
+++ b/spec/qunit_spec.js
@@ -521,13 +521,21 @@ test("GH-14: a partial preceding a selector", function() {
shouldCompileToWithPartials(string, [hash, {}, {dude:dude}], true, "Dudes: Jeepers Creepers", "Regular selectors can follow a partial");
});
-test("Partials with literal paths", function() {
- var string = "Dudes: {{> [dude]}}";
+test("Partials with slash paths", function() {
+ var string = "Dudes: {{> shared/dude}}";
var dude = "{{name}}";
var hash = {name:"Jeepers", another_dude:"Creepers"};
- shouldCompileToWithPartials(string, [hash, {}, {dude:dude}], true, "Dudes: Jeepers", "Partials can use literal paths");
+ shouldCompileToWithPartials(string, [hash, {}, {'shared/dude':dude}], true, "Dudes: Jeepers", "Partials can use literal paths");
});
+test("Partials with integer path", function() {
+ var string = "Dudes: {{> 404}}";
+ var dude = "{{name}}";
+ var hash = {name:"Jeepers", another_dude:"Creepers"};
+ shouldCompileToWithPartials(string, [hash, {}, {404:dude}], true, "Dudes: Jeepers", "Partials can use literal paths");
+});
+
+
suite("String literal parameters");
test("simple literals work", function() {