summaryrefslogtreecommitdiffstats
path: root/test/plugins.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-01-30 16:53:38 +0100
committerSamy Pessé <samypesse@gmail.com>2015-01-30 16:53:42 +0100
commitd7caf6686e4574472f6648bc9409476059571490 (patch)
tree39693515464b95b8cde7fffd409146d9adb8960f /test/plugins.js
parent71dad602ec68a105762eff102dba12a98a40a1b1 (diff)
downloadgitbook-d7caf6686e4574472f6648bc9409476059571490.zip
gitbook-d7caf6686e4574472f6648bc9409476059571490.tar.gz
gitbook-d7caf6686e4574472f6648bc9409476059571490.tar.bz2
Fix namespacing of plugins resources
Diffstat (limited to 'test/plugins.js')
-rw-r--r--test/plugins.js22
1 files changed, 18 insertions, 4 deletions
diff --git a/test/plugins.js b/test/plugins.js
index 2351537..c7d1f90 100644
--- a/test/plugins.js
+++ b/test/plugins.js
@@ -48,19 +48,33 @@ describe('Plugins', function () {
assert(plugin.isValid());
});
- it('should return a valid list of resources', function(done) {
+ it('should return a valid list of resources (website)', function(done) {
qdone(
- plugin.getResources()
+ plugin.getResources("website")
.then(function(resources) {
assert.equal(resources["js"].length, 1);
}),
done);
});
- it('should extend books plugins', function() {
- var resources = books[0].plugins.resources;
+ it('should return a valid list of resources (ebook)', function(done) {
+ qdone(
+ plugin.getResources("ebook")
+ .then(function(resources) {
+ assert.equal(resources["css"].length, 1);
+ }),
+ done);
+ });
+
+ it('should extend books plugins (website)', function() {
+ var resources = books[0].plugins.resources("website");
assert.equal(resources["js"].length, 1);
});
+
+ it('should extend books plugins (ebook)', function() {
+ var resources = books[0].plugins.resources("ebook");
+ assert.equal(resources["css"].length, 1);
+ });
});
describe('filters', function() {