From 9c10936cf1420f160a5007c6baad7b25ffb6d014 Mon Sep 17 00:00:00 2001 From: HumairAK Date: Tue, 26 Jul 2016 16:44:06 -0400 Subject: Added more unit tests, fixed some bugs in the code, fixed voting alert prompts and redirects --- test/data/exam.json | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 test/data/exam.json (limited to 'test/data') diff --git a/test/data/exam.json b/test/data/exam.json new file mode 100644 index 0000000..0504679 --- /dev/null +++ b/test/data/exam.json @@ -0,0 +1,60 @@ +{ + "existing" : { + "_id": { + "$oid": "57917d4d2a73c0224fb6e763" + }, + "course_code": "CSC373", + "year": "2016", + "term": "Midterm", + "type": "Winter", + "instructors": [ + "Robert Dane" + ], + "page_count": "20", + "questions_count": "2", + "questions_list": [ + { + "q_id": 1, + "question": "Question 1" + }, + { + "q_id": 2, + "question": "Question 2" + } + ], + "upload_date": "2005-06-10", + "uploaded_by": [ + "humair", + "" + ] + }, + "nonExisting" : { + "_id": { + "$oid": "999999999999999999999999" + }, + "course_code": "CSC373", + "year": "2016", + "term": "Midterm", + "type": "Winter", + "instructors": [ + "Robert Dane" + ], + "page_count": "20", + "questions_count": "2", + "questions_list": [ + { + "q_id": 1, + "question": "Question 1" + }, + { + "q_id": 2, + "question": "Question 2" + } + ], + "upload_date": "2005-06-10", + "uploaded_by": [ + "humair", + "" + ] + } +} \ No newline at end of file -- cgit v1.2.3