blob: d430a4f67779188e5252875689eb0c80dbc21cbc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
var TemplateEngine = require('../../models/templateEngine');
var renderTemplate = require('../render');
describe('ConrefsLoader', function() {
var ConrefsLoader = require('../conrefsLoader');
var engine = TemplateEngine({
loader: new ConrefsLoader(__dirname)
});
describe('Git', function() {
it('should include content from git', function() {
return renderTemplate(engine, 'test.md', '{% include "git+https://gist.github.com/69ea4542e4c8967d2fa7.git/test.md" %}')
.then(function(out) {
expect(out.getContent()).toBe('Hello from git');
});
});
it('should handle deep inclusion (1)', function() {
return renderTemplate(engine, 'test.md', '{% include "git+https://gist.github.com/69ea4542e4c8967d2fa7.git/test2.md" %}')
.then(function(out) {
expect(out.getContent()).toBe('First Hello. Hello from git');
});
});
it('should handle deep inclusion (2)', function() {
return renderTemplate(engine, 'test.md', '{% include "git+https://gist.github.com/69ea4542e4c8967d2fa7.git/test3.md" %}')
.then(function(out) {
expect(out.getContent()).toBe('First Hello. Hello from git');
});
});
});
});
|