summaryrefslogtreecommitdiffstats
path: root/spec/builtins.js
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2015-08-01 15:48:16 -0500
committerkpdecker <kpdecker@gmail.com>2015-08-01 15:48:28 -0500
commit2a851067b99c3932e471f5fc1a2d40dc25a084c4 (patch)
treee60d5e58b2daba3c912e5c2db4b13c159af0b268 /spec/builtins.js
parent410141c31e547694746f3ce9427d1dde30070777 (diff)
downloadhandlebars.js-2a851067b99c3932e471f5fc1a2d40dc25a084c4.zip
handlebars.js-2a851067b99c3932e471f5fc1a2d40dc25a084c4.tar.gz
handlebars.js-2a851067b99c3932e471f5fc1a2d40dc25a084c4.tar.bz2
Add with block parameter support
Fixes #1042
Diffstat (limited to 'spec/builtins.js')
-rw-r--r--spec/builtins.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/builtins.js b/spec/builtins.js
index 46d70ba..9598743 100644
--- a/spec/builtins.js
+++ b/spec/builtins.js
@@ -47,6 +47,10 @@ describe('builtin helpers', function() {
var string = '{{#with person}}Person is present{{else}}Person is not present{{/with}}';
shouldCompileTo(string, {}, 'Person is not present');
});
+ it('with provides block parameter', function() {
+ var string = '{{#with person as |foo|}}{{foo.first}} {{last}}{{/with}}';
+ shouldCompileTo(string, {person: {first: 'Alan', last: 'Johnson'}}, 'Alan Johnson');
+ });
});
describe('#each', function() {