summaryrefslogtreecommitdiffstats
path: root/spec/string-params.js
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2014-01-06 02:40:43 -0600
committerkpdecker <kpdecker@gmail.com>2014-01-06 02:45:09 -0600
commitfc60f16475c3a204849371f485c9316af40765e7 (patch)
tree9586c8dac7229e7f9aa7665290562e80642ffa38 /spec/string-params.js
parent08fab253ef86a2a6fe99e166485552b2d23cd24f (diff)
downloadhandlebars.js-fc60f16475c3a204849371f485c9316af40765e7.zip
handlebars.js-fc60f16475c3a204849371f485c9316af40765e7.tar.gz
handlebars.js-fc60f16475c3a204849371f485c9316af40765e7.tar.bz2
Fix DATA value in stringParams mode
Fixes #699
Diffstat (limited to 'spec/string-params.js')
-rw-r--r--spec/string-params.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/string-params.js b/spec/string-params.js
index 920b855..1cebc6f 100644
--- a/spec/string-params.js
+++ b/spec/string-params.js
@@ -158,4 +158,19 @@ describe('string params mode', function() {
var result = template({}, {helpers: helpers});
equals(result, "WITH");
});
+
+ it('should handle DATA', function() {
+ var template = CompilerContext.compile('{{foo @bar}}', { stringParams: true });
+
+ var helpers = {
+ foo: function(bar, options) {
+ equal(bar, 'bar');
+ equal(options.types[0], 'DATA');
+ return 'Foo!';
+ }
+ };
+
+ var result = template({}, { helpers: helpers });
+ equal(result, 'Foo!');
+ });
});