summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSamy Pesse <samypesse@gmail.com>2016-05-05 11:09:35 +0200
committerSamy Pesse <samypesse@gmail.com>2016-05-05 11:09:35 +0200
commitb6051babac5cc384ff14971a3702257a3323ed77 (patch)
tree0c47ba7cd269dcc6afffd90c9a56f4f92168a62c /lib
parent34947b5e207e84ef43a8194c0ec7bac19dccf709 (diff)
downloadgitbook-b6051babac5cc384ff14971a3702257a3323ed77.zip
gitbook-b6051babac5cc384ff14971a3702257a3323ed77.tar.gz
gitbook-b6051babac5cc384ff14971a3702257a3323ed77.tar.bz2
Adapt unit tests for new templating post process
Diffstat (limited to 'lib')
-rw-r--r--lib/models/__tests__/templateBlock.js1
-rw-r--r--lib/templating/__tests__/conrefsLoader.js12
2 files changed, 6 insertions, 7 deletions
diff --git a/lib/models/__tests__/templateBlock.js b/lib/models/__tests__/templateBlock.js
index 597b672..db82b66 100644
--- a/lib/models/__tests__/templateBlock.js
+++ b/lib/models/__tests__/templateBlock.js
@@ -13,7 +13,6 @@ describe('TemplateBlock', function() {
// Check basic templateBlock properties
expect(templateBlock.getName()).toBe('sayhello');
- expect(templateBlock.getPost()).toBeNull();
expect(templateBlock.getParse()).toBeTruthy();
expect(templateBlock.getEndTag()).toBe('endsayhello');
expect(templateBlock.getBlocks().size).toBe(0);
diff --git a/lib/templating/__tests__/conrefsLoader.js b/lib/templating/__tests__/conrefsLoader.js
index 3480a48..ff484b7 100644
--- a/lib/templating/__tests__/conrefsLoader.js
+++ b/lib/templating/__tests__/conrefsLoader.js
@@ -11,22 +11,22 @@ describe('ConrefsLoader', function() {
describe('Git', function() {
pit('should include content from git', function() {
return renderTemplate(engine, 'test.md', '{% include "git+https://gist.github.com/69ea4542e4c8967d2fa7.git/test.md" %}')
- .then(function(str) {
- expect(str).toBe('Hello from git');
+ .then(function(out) {
+ expect(out.getContent()).toBe('Hello from git');
});
});
pit('should handle deep inclusion (1)', function() {
return renderTemplate(engine, 'test.md', '{% include "git+https://gist.github.com/69ea4542e4c8967d2fa7.git/test2.md" %}')
- .then(function(str) {
- expect(str).toBe('First Hello. Hello from git');
+ .then(function(out) {
+ expect(out.getContent()).toBe('First Hello. Hello from git');
});
});
pit('should handle deep inclusion (2)', function() {
return renderTemplate(engine, 'test.md', '{% include "git+https://gist.github.com/69ea4542e4c8967d2fa7.git/test3.md" %}')
- .then(function(str) {
- expect(str).toBe('First Hello. Hello from git');
+ .then(function(out) {
+ expect(out.getContent()).toBe('First Hello. Hello from git');
});
});
});