summaryrefslogtreecommitdiffstats
path: root/test/plugins.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-01-27 22:27:59 +0100
committerSamy Pessé <samypesse@gmail.com>2015-01-27 22:27:59 +0100
commitd8995200e6802f77de1f0e3699e208695c89b95e (patch)
tree451b7af168723148e1de81714872b00d47b5fdf8 /test/plugins.js
parentbc389ab4a1ea9013a869c0b33162fb67bb0d0708 (diff)
downloadgitbook-d8995200e6802f77de1f0e3699e208695c89b95e.zip
gitbook-d8995200e6802f77de1f0e3699e208695c89b95e.tar.gz
gitbook-d8995200e6802f77de1f0e3699e208695c89b95e.tar.bz2
Add options "shortcuts" for blocks from plugins
Diffstat (limited to 'test/plugins.js')
-rw-r--r--test/plugins.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/plugins.js b/test/plugins.js
index 3c60a20..43ce497 100644
--- a/test/plugins.js
+++ b/test/plugins.js
@@ -98,6 +98,16 @@ describe('Plugins', function () {
);
});
+ it('should correctly accept shortcuts', function(done) {
+ qdone(
+ books[0].template.renderString('$$hello$$')
+ .then(function(content) {
+ assert.equal(content, "testhellotest");
+ }),
+ done
+ );
+ });
+
it('should correctly extend template blocks with defined end', function(done) {
qdone(
books[0].template.renderString('{% test2 %}hello{% endtest2end %}')