/**
 * Module dependencies.
 */
var should = require('should'),
    app = require('../../server'),
    mongoose = require('mongoose'),
    User = mongoose.model('User');

//Globals
var user;

//The tests
describe('<Unit Test>', function() {
    describe('Model User:', function() {
        before(function(done) {
            user = new User({
                name: 'Full name',
                email: 'test@test.com',
                username: 'user',
                password: 'password'
            });

            done();
        });

        describe('Method Save', function() {
          it('should be able to save without problems', (done) => {
            user.save((err) => {
                    should.not.exist(err);
                    done();
                });
            });

          it('should throw an error when trying to save without a name', (done) => {
                user.name = '';
            user.save((err) => {
                    should.exist(err);
                    done();
                });
            });
        });

        describe('');



        after(function(done) {
            done();
        });
    });
});

/**
 * Module dependencies.
 */
var should = require('should'),
    app = require('../../server'),
    mongoose = require('mongoose'),
    User = mongoose.model('User');

//Globals
var user;

//The tests
describe('<Unit Test>', function() {
    describe('Model User:', function() {
        before(function(done) {
            user = new User({
                name: 'Full name',
                email: 'test@test.com',
                username: 'user',
                password: 'password'
            });

            done();
        });

        describe('Method Save', function() {
          it('should be able to save without problems', (done) => {
            user.save((err) => {
                    should.not.exist(err);
                    done();
                });
            });

          it('should throw an error when trying to save without a name', (done) => {
                user.name = '';
            user.save((err) => {
                    should.exist(err);
                    done();
                });
            });
        });

        after(function(done) {
            done();
        });
    });
});

fix failing test on travisCI [Fixes #134209531]