Test more concrete behavior in partial hash test

This commit is contained in:
kpdecker
2014-01-17 17:11:28 -06:00
parent 45ae86a248
commit e290ec24f1
+4 -4
View File
@@ -24,10 +24,10 @@ describe('partials', function() {
});
it("partials with parameters", function() {
var string = "Dudes: {{#dudes}}{{> dude otherDude=name}}{{/dudes}}";
var partial = "{{otherDude}} ({{url}}) ";
var hash = {dudes: [{name: "Yehuda", url: "http://yehuda"}, {name: "Alan", url: "http://alan"}]};
shouldCompileToWithPartials(string, [hash, {}, {dude: partial}], true, "Dudes: Yehuda (http://yehuda) Alan (http://alan) ",
var string = "Dudes: {{#dudes}}{{> dude others=..}}{{/dudes}}";
var partial = "{{others.foo}}{{name}} ({{url}}) ";
var hash = {foo: 'bar', dudes: [{name: "Yehuda", url: "http://yehuda"}, {name: "Alan", url: "http://alan"}]};
shouldCompileToWithPartials(string, [hash, {}, {dude: partial}], true, "Dudes: barYehuda (http://yehuda) barAlan (http://alan) ",
"Basic partials output based on current context.");
});