Skip to content
This repository was archived by the owner on Aug 30, 2021. It is now read-only.

Commit c967a98

Browse files
committed
refactoring the async nature in the user model tests to account for mocha 2 second timeouts causing travis-ci build fails
1 parent 057a0cc commit c967a98

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

modules/users/tests/server/user.server.model.tests.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var user, user2, user3;
1616
* Unit tests
1717
*/
1818
describe('User Model Unit Tests:', function () {
19-
before(function (done) {
19+
before(function () {
2020
user = {
2121
firstName: 'Full',
2222
lastName: 'Name',
@@ -45,7 +45,6 @@ describe('User Model Unit Tests:', function () {
4545
provider: 'local'
4646
};
4747

48-
done();
4948
});
5049

5150
describe('Method Save', function () {
@@ -71,7 +70,7 @@ describe('User Model Unit Tests:', function () {
7170
it('should fail to save an existing user again', function (done) {
7271
var _user = new User(user);
7372
var _user2 = new User(user2);
74-
73+
7574
_user.save(function () {
7675
_user2.save(function (err) {
7776
should.exist(err);
@@ -130,7 +129,7 @@ describe('User Model Unit Tests:', function () {
130129
});
131130
});
132131

133-
it('should not be able to save different user with the same email address', function (done) {
132+
it('should not be able to save different user with the same email address', function () {
134133
var _user = new User(user);
135134
var _user3 = new User(user3);
136135

@@ -143,7 +142,6 @@ describe('User Model Unit Tests:', function () {
143142
should.exist(err);
144143
// Restoring the original email for test3 so it can be used in later tests
145144
_user3.email = user3_email;
146-
done();
147145
});
148146
});
149147
});

0 commit comments

Comments
 (0)