diff options
author | Yehuda Katz <wycats@gmail.com> | 2011-12-27 00:43:30 -0800 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2011-12-27 00:43:30 -0800 |
commit | bd0f74fbd9c80aa148a66012b9db51df102eda64 (patch) | |
tree | bdb6476f0bceb5f34d4869a9f496a57cbde35b50 /spec/qunit_spec.js | |
parent | e57e626480b316d381957e1e94b2a02868b029f8 (diff) | |
download | handlebars.js-bd0f74fbd9c80aa148a66012b9db51df102eda64.zip handlebars.js-bd0f74fbd9c80aa148a66012b9db51df102eda64.tar.gz handlebars.js-bd0f74fbd9c80aa148a66012b9db51df102eda64.tar.bz2 |
Test that the hello world mustache example works
Diffstat (limited to 'spec/qunit_spec.js')
-rw-r--r-- | spec/qunit_spec.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/qunit_spec.js b/spec/qunit_spec.js index 98d4f7b..1935cd2 100644 --- a/spec/qunit_spec.js +++ b/spec/qunit_spec.js @@ -993,3 +993,15 @@ test("GH-150: Inverted sections print when they shouldn't", function() { shouldCompileTo(string, {set: false}, "not set :: ", "inverted sections run when property is false"); shouldCompileTo(string, {set: true}, " :: set", "inverted sections don't run when property is true"); }); + +test("Mustache man page", function() { + var string = "Hello {{name}}. You have just won ${{value}}!{{#in_ca}} Well, ${{taxed_value}}, after taxes.{{/in_ca}}" + var data = { + "name": "Chris", + "value": 10000, + "taxed_value": 10000 - (10000 * 0.4), + "in_ca": true + } + + shouldCompileTo(string, data, "Hello Chris. You have just won $10000! Well, $6000, after taxes.", "the hello world mustache example works"); +}); |