diff options
Diffstat (limited to 'test/glossary.js')
-rw-r--r-- | test/glossary.js | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/test/glossary.js b/test/glossary.js index e2c9e2b..116eabf 100644 --- a/test/glossary.js +++ b/test/glossary.js @@ -55,22 +55,17 @@ describe('Glossary', function() { should.not.exist(entry); }); }); - }); - - it('should parse glossary entries', function() { - return mock.setupDefaultBook({ - 'GLOSSARY.md': '# Glossary\n\n### Hello World\n\nThis is an entry' - }) - .then(function(book) { - return book.prepareConfig() - - .then(function() { - return book.glossary.load(); - }) - .then(function() { - + describe('glossary.find', function() { + it('should return an existing entry', function() { + var entry = book.glossary.find('HeLLo World'); + should.exist(entry); + entry.id.should.equal('hello_world'); + }); + it('should undefined return non existing entry', function() { + var entry = book.glossary.find('Hello'); + should.not.exist(entry); }); }); }); |