diff options
author | kpdecker <kpdecker@gmail.com> | 2015-08-01 16:29:45 -0500 |
---|---|---|
committer | kpdecker <kpdecker@gmail.com> | 2015-08-01 16:29:45 -0500 |
commit | 231a8d7256d24c1a0287d67d393f06faa32751e8 (patch) | |
tree | 3949a89a06742a0d2329b7c8f5fe19216187d5df /spec/builtins.js | |
parent | e2ba22eaad24575ab3cb235b8fc36683acf610c2 (diff) | |
download | handlebars.js-231a8d7256d24c1a0287d67d393f06faa32751e8.zip handlebars.js-231a8d7256d24c1a0287d67d393f06faa32751e8.tar.gz handlebars.js-231a8d7256d24c1a0287d67d393f06faa32751e8.tar.bz2 |
Fix with operator in no @data mode
Diffstat (limited to 'spec/builtins.js')
-rw-r--r-- | spec/builtins.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/builtins.js b/spec/builtins.js index 9598743..e5d923f 100644 --- a/spec/builtins.js +++ b/spec/builtins.js @@ -51,6 +51,12 @@ describe('builtin helpers', function() { var string = '{{#with person as |foo|}}{{foo.first}} {{last}}{{/with}}'; shouldCompileTo(string, {person: {first: 'Alan', last: 'Johnson'}}, 'Alan Johnson'); }); + it('works when data is disabled', function() { + var template = CompilerContext.compile('{{#with person as |foo|}}{{foo.first}} {{last}}{{/with}}', {data: false}); + + var result = template({person: {first: 'Alan', last: 'Johnson'}}); + equals(result, 'Alan Johnson'); + }); }); describe('#each', function() { |