From 413dc5d004179eb9b6fa86da4c4e1a3cc54514d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Wed, 16 Apr 2014 17:15:43 +0200 Subject: [PATCH] Add more test for quiz (related to #100) --- test/fixtures/QUIZ_PAGE.md | 15 +++++++++++++++ test/page.js | 1 + 2 files changed, 16 insertions(+) diff --git a/test/fixtures/QUIZ_PAGE.md b/test/fixtures/QUIZ_PAGE.md index 545d083db..a0760551e 100644 --- a/test/fixtures/QUIZ_PAGE.md +++ b/test/fixtures/QUIZ_PAGE.md @@ -31,3 +31,18 @@ Some more nice content .... [Cool stuff](http://gitbook.io) [Link to another Markdown file](./xyz/file.md) + +--- + +Quiz test 2: What does Gitbook support? +- [x] Table-based questions with radio buttons +- [x] Table-based questions with checkboxes +- [ ] Telepathy +- [x] List-based questions with checkboxes +- [x] List-based questions with radio buttons +- [ ] Moon-on-a-stick + +> Gitbook supports table and list based quiz questions using either radio buttons or checkboxes. + +--- + diff --git a/test/page.js b/test/page.js index a8a377007..52a3df611 100644 --- a/test/page.js +++ b/test/page.js @@ -28,6 +28,7 @@ describe('Page parsing', function() { assert.equal(QUIZ_LEXED[0].type, 'normal'); assert.equal(QUIZ_LEXED[1].type, 'quiz'); assert.equal(QUIZ_LEXED[2].type, 'normal'); + assert.equal(QUIZ_LEXED[3].type, 'quiz'); }); it('should gen content for normal sections', function() {