diff --git a/services/quiz.js b/services/quiz.js index 89635df1..49a6c819 100644 --- a/services/quiz.js +++ b/services/quiz.js @@ -21,13 +21,14 @@ const quizService = { }, createQuiz: async (author, data) => { - const { title, category, items } = data + const { title, category, items, description } = data return await Quiz.create({ title, author, category, - items + items, + description }) }, diff --git a/test/integration/controllers/quiz.spec.js b/test/integration/controllers/quiz.spec.js index 6b48af96..7a9b819e 100644 --- a/test/integration/controllers/quiz.spec.js +++ b/test/integration/controllers/quiz.spec.js @@ -11,6 +11,7 @@ const endpointUrl = '/quizzes/' const testQuizData = { title: 'Assembly', + description: 'Description', category: '6502ec2060ec37be943353e2', items: ['6527ed6c14c6b72f36962364'] }