summaryrefslogtreecommitdiffstats
path: root/spec/qunit_spec.js
diff options
context:
space:
mode:
authortomhuda <tomhuda@tilde.io>2013-01-18 16:42:27 -0800
committertomhuda <tomhuda@tilde.io>2013-01-18 16:42:27 -0800
commitce82bef6f1b0321d8140ae2085200dab77a5e6db (patch)
treed6c9660cecc2c4c6214f9c8c8c554728a6718b09 /spec/qunit_spec.js
parentcd9895061bebd8342c344c3b846651b80145e2bf (diff)
downloadhandlebars.js-ce82bef6f1b0321d8140ae2085200dab77a5e6db.zip
handlebars.js-ce82bef6f1b0321d8140ae2085200dab77a5e6db.tar.gz
handlebars.js-ce82bef6f1b0321d8140ae2085200dab77a5e6db.tar.bz2
Boolean("false") === true
Diffstat (limited to 'spec/qunit_spec.js')
-rw-r--r--spec/qunit_spec.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/qunit_spec.js b/spec/qunit_spec.js
index 6bc5a43..fb78c37 100644
--- a/spec/qunit_spec.js
+++ b/spec/qunit_spec.js
@@ -1194,16 +1194,17 @@ test("when inside a block in String mode, .. passes the appropriate context in t
});
test("in string mode, information about the types is passed along", function() {
- var template = CompilerContext.compile('{{tomdale "need" dad.joke true}}', { stringParams: true });
+ var template = CompilerContext.compile('{{tomdale "need" dad.joke true false}}', { stringParams: true });
var helpers = {
- tomdale: function(desire, noun, bool, options) {
+ tomdale: function(desire, noun, trueBool, falseBool, options) {
equal(options.types[0], 'STRING', "the string type is passed");
equal(options.types[1], 'ID', "the expression type is passed");
equal(options.types[2], 'BOOLEAN', "the expression type is passed");
equal(desire, "need", "the string form is passed for strings");
equal(noun, "dad.joke", "the string form is passed for expressions");
- equal(bool, true, "raw booleans are passed through");
+ equal(trueBool, true, "raw booleans are passed through");
+ equal(falseBool, false, "raw booleans are passed through");
return "Helper called";
}
};