text: 'use strict';
  
  /**
   * Module dependencies.
   */
  var should = require('should'),
    mongoose = require('mongoose'),
    User = mongoose.model('User'),
    Quiz = mongoose.model('Quiz');
  
  /**
   * Globals
   */
  var user, quiz;
  
  /**
   * Unit tests
   */
  describe('Quiz Model Unit Tests:', function () {
  
    beforeEach(function (done) {
      user = new User({
        firstName: 'Full',
        lastName: 'Name',
        displayName: 'Full Name',
        email: 'testasdfadf@ufl.com',
        username: 'usernameAA',
        password: 'M3@n.jsI$Aw3$0m3'
      });
  
      user.save(function () {
        quiz = new Quiz({
          title: 'Quiz Title',
          question: 'Quiz Content',
          choices: [{ letter:'A', description:'asdf' }],
          correctAnswer: 'A',
          user: user
        });
  
        done();
      });
    });
  
    describe('Method Save', function () {
      it('should be able to save without problems', function (done) {
        this.timeout(10000);
        return quiz.save(function (err) {
          should.not.exist(err);
          done();
        });
      });
  
      it('should be able to show an error when try to save without title', function (done) {
        quiz.title = '';
  
        return quiz.save(function (err) {
          should.exist(err);
          done();
        });
      });
    });
  
    afterEach(function (done) {
      Quiz.remove().exec(function () {
        User.remove().exec(done);
      });
    });
  });
  