Add test for #595: glossary links in subpages

This commit is contained in:
Samy Pessé
2015-02-07 20:35:24 +01:00
parent 4a9adb9440
commit 370799ac55
2 changed files with 14 additions and 0 deletions
+2
View File
@@ -4,3 +4,5 @@ This is a relative link [test](../intro.md).
![image](../image.png)
This is a glossary link.
+12
View File
@@ -19,4 +19,16 @@ describe('Glossary Generation', function () {
assert($a.text() == "description");
}, done);
});
it('should correctly replace glossary terms in sub pages', function(done) {
testGeneration(books[1], "website", function(output) {
var content = fs.readFileSync(path.join(output, "sub/test1.html"), { encoding: "utf8" });
var $ = cheerio.load(content);
var $body = $(".page-inner");
var $a = $("a[href='../GLOSSARY.html#test']");
assert($a.length == 1);
assert($a.text() == "a test text");
}, done);
});
});