summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-01-28 18:27:27 +0100
committerSamy Pessé <samypesse@gmail.com>2015-01-28 18:27:27 +0100
commit1f7d349aedf6e75122b568aa3e90e016c6903f09 (patch)
treeff9295a19d9c7286a9b5cf7b504a42180178d5fa /test
parentc0d922560daa53ad31f356480e6fbe3f2191f471 (diff)
downloadgitbook-1f7d349aedf6e75122b568aa3e90e016c6903f09.zip
gitbook-1f7d349aedf6e75122b568aa3e90e016c6903f09.tar.gz
gitbook-1f7d349aedf6e75122b568aa3e90e016c6903f09.tar.bz2
Fix conversion of svg when cache is empty
Diffstat (limited to 'test')
-rw-r--r--test/ebook.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ebook.js b/test/ebook.js
index 6facd8b..9e2dab6 100644
--- a/test/ebook.js
+++ b/test/ebook.js
@@ -15,6 +15,7 @@ describe('eBook Generator', function () {
it('should correctly convert svg images to png', function(done) {
testGeneration(books[4], "ebook", function(output) {
+ var readmeContent = fs.readFileSync(path.join(output, "index.html"), {encoding: "utf8"});
var pageContent = fs.readFileSync(path.join(output, "sub/PAGE.html"), {encoding: "utf8"});
assert(fs.existsSync(path.join(output, "test.png")));
@@ -26,6 +27,9 @@ describe('eBook Generator', function () {
assert(pageContent.indexOf('src="../test.png"') >= 0);
assert(pageContent.indexOf('src="../NewTux.png"') >= 0);
+
+ assert(readmeContent.indexOf('src="test.png"') >= 0);
+ assert(readmeContent.indexOf('src="NewTux.png"') >= 0);
}, done);
});
});