summaryrefslogtreecommitdiffstats
path: root/test/summary.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/summary.js')
-rw-r--r--test/summary.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/summary.js b/test/summary.js
index 68c23b4..a98b6b7 100644
--- a/test/summary.js
+++ b/test/summary.js
@@ -33,6 +33,32 @@ describe('Summary / Table of contents', function() {
});
});
+ describe('Non-existant summary', function() {
+ var book;
+
+ before(function() {
+ return mock.setupBook({
+ 'README.md': 'Hello'
+ })
+ .then(function(_book) {
+ book = _book;
+
+ return book.readme.load()
+ .then(function() {
+ return book.summary.load();
+ });
+ });
+ });
+
+ it('should add README as first entry', function() {
+ should(book.summary.getArticle('README.md')).be.ok();
+ });
+
+ it('should correctly count articles', function() {
+ book.summary.count().should.equal(1);
+ });
+ });
+
describe('Non-empty summary list', function() {
var book;