text: 'use strict';
  
  /**
   * Module dependencies.
   */
  var should = require('should'),
    mongoose = require('mongoose'),
    User = mongoose.model('User'),
    Queue = mongoose.model('Queue');
  
  /**
   * Globals
   */
  var user, queue;
  
  /**
   * Unit tests
   */
  describe('Queue Model Unit Tests:', function () {
    beforeEach(function (done) {
      user = new User({
        firstName: 'Full',
        lastName: 'Name',
        displayName: 'Full Name',
        email: 'test@test.com',
        username: 'username',
        password: 'password'
      });
  
      user.save(function () {
        queue = new Queue({
          title: 'Queue Title',
          content: 'Queue Content',
          user: user
        });
  
        done();
      });
    });
  
    describe('Method Save', function () {
      it('should be able to save without problems', function (done) {
        return queue.save(function (err) {
          should.not.exist(err);
          done();
        });
      });
  
      it('should be able to show an error when try to save without title', function (done) {
        queue.title = '';
  
        return queue.save(function (err) {
          should.exist(err);
          done();
        });
      });
    });
  
    afterEach(function (done) {
      Queue.remove().exec(function () {
        User.remove().exec(done);
      });
    });
  });
  