diff --git a/app/templates/server/api/user(auth)/user.model.spec.js b/app/templates/server/api/user(auth)/user.model.spec.js index 938055b85..ae03130bf 100644 --- a/app/templates/server/api/user(auth)/user.model.spec.js +++ b/app/templates/server/api/user(auth)/user.model.spec.js @@ -1,19 +1,18 @@ 'use strict'; var should = require('should'); +var app = require('../../app'); var User = require('./user.model'); -var user; +var user = new User({ + provider: 'local', + name: 'Fake User', + email: 'test@test.com', + password: 'password' +}); describe('User Model', function() { - before(function(done) { - user = new User({ - provider: 'local', - name: 'Fake User', - email: 'test@test.com', - password: 'password' - }); - + beforeEach(function(done) { // Clear users before testing User.remove().exec().then(function() { done();