diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-02-07 20:35:24 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-02-07 20:35:24 +0100 |
commit | 370799ac555676bbef44fe27a569307b7e0d5232 (patch) | |
tree | 5a1c1d76c0dddd8947f8e167979309b442a8c59a /test/glossary.js | |
parent | 4a9adb9440b21356cd7b45887088f63230131818 (diff) | |
download | gitbook-370799ac555676bbef44fe27a569307b7e0d5232.zip gitbook-370799ac555676bbef44fe27a569307b7e0d5232.tar.gz gitbook-370799ac555676bbef44fe27a569307b7e0d5232.tar.bz2 |
Add test for #595: glossary links in subpages
Diffstat (limited to 'test/glossary.js')
-rw-r--r-- | test/glossary.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/glossary.js b/test/glossary.js index 442f857..da2cbb1 100644 --- a/test/glossary.js +++ b/test/glossary.js @@ -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); + }); }); |