got user CRUD unit tests to pass
This commit is contained in:
parent
58512df124
commit
328b8e3da0
121
;
Normal file
121
;
Normal file
|
@ -0,0 +1,121 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var should = require('should'),
|
||||||
|
_ = require('lodash'),
|
||||||
|
app = require('../../server'),
|
||||||
|
request = require('supertest'),
|
||||||
|
Session = require('supertest-session'),
|
||||||
|
mongoose = require('mongoose'),
|
||||||
|
User = mongoose.model('User'),
|
||||||
|
config = require('../../config/config'),
|
||||||
|
tmpUser = mongoose.model(config.tempUserCollection),
|
||||||
|
url = require('url');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Globals
|
||||||
|
*/
|
||||||
|
var credentials, _User;
|
||||||
|
var _tmpUser, activateToken;
|
||||||
|
var username, userSession;
|
||||||
|
|
||||||
|
username = 'testActiveAccount1.be1e58fb@mailosaur.in';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Form routes tests
|
||||||
|
*/
|
||||||
|
describe('User CRUD tests', function() {
|
||||||
|
this.timeout(30000);
|
||||||
|
|
||||||
|
beforeEach(function() {
|
||||||
|
// Create user credentials
|
||||||
|
credentials = {
|
||||||
|
username: 'test7@test.com',
|
||||||
|
password: 'password'
|
||||||
|
};
|
||||||
|
|
||||||
|
//Create a new user
|
||||||
|
_User = {
|
||||||
|
firstName: 'Full',
|
||||||
|
lastName: 'Name',
|
||||||
|
email: credentials.username,
|
||||||
|
username: credentials.username,
|
||||||
|
password: credentials.password,
|
||||||
|
provider: 'local'
|
||||||
|
};
|
||||||
|
|
||||||
|
//Initialize Session
|
||||||
|
userSession = Session(app);
|
||||||
|
});
|
||||||
|
|
||||||
|
describe(' > Create, Verify and Activate a User > ', function() {
|
||||||
|
//this.timeout(15000);
|
||||||
|
|
||||||
|
it('should be able to create a temporary (non-activated) User', function(done) {
|
||||||
|
userSession.post('/auth/signup')
|
||||||
|
.send(_User)
|
||||||
|
.expect(200)
|
||||||
|
.end(function(FormSaveErr, FormSaveRes) {
|
||||||
|
// Handle error
|
||||||
|
should.not.exist(FormSaveErr);
|
||||||
|
|
||||||
|
tmpUser.findOne({username: _User.username}, function (err, user) {
|
||||||
|
should.not.exist(err);
|
||||||
|
should.exist(user);
|
||||||
|
_tmpUser = user;
|
||||||
|
|
||||||
|
_User.username.should.equal(user.username);
|
||||||
|
_User.firstName.should.equal(user.firstName);
|
||||||
|
_User.lastName.should.equal(user.lastName);
|
||||||
|
activateToken = user.GENERATED_VERIFYING_URL;
|
||||||
|
console.log('activateToken: '+activateToken);
|
||||||
|
|
||||||
|
userSession.get('/auth/verify/'+activateToken)
|
||||||
|
.expect(200)
|
||||||
|
.end(function(VerifyErr, VerifyRes) {
|
||||||
|
// Handle error
|
||||||
|
if (VerifyErr) return done(VerifyErr);
|
||||||
|
(VerifyRes.text).should.equal('User successfully verified');
|
||||||
|
|
||||||
|
userSession.post('/auth/signin')
|
||||||
|
.send(credentials)
|
||||||
|
.expect('Content-Type', /json/)
|
||||||
|
.expect(200)
|
||||||
|
.end(function(signinErr, signinRes) {
|
||||||
|
// Handle signin error
|
||||||
|
if (signinErr) return done(signinErr);
|
||||||
|
|
||||||
|
var user = signinRes.body;
|
||||||
|
(user.username).should.equal(credentials.username);
|
||||||
|
|
||||||
|
userSession.get('/auth/signout')
|
||||||
|
.expect(200)
|
||||||
|
.end(function(signoutErr, signoutRes) {
|
||||||
|
|
||||||
|
// Handle signout error
|
||||||
|
if (signoutErr) return done(signoutErr);
|
||||||
|
|
||||||
|
(signoutRes.text).should.equal('Successfully logged out'');
|
||||||
|
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
it(' > should be able to reset a User\'s password');
|
||||||
|
|
||||||
|
it(' > should be able to delete a User account without any problems');
|
||||||
|
|
||||||
|
afterEach(function(done) {
|
||||||
|
User.remove().exec(function () {
|
||||||
|
tmpUser.remove().exec(function(){
|
||||||
|
userSession.destroy();
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
|
@ -36,7 +36,6 @@ exports.userByID = function (req, res, next, id) {
|
||||||
*/
|
*/
|
||||||
exports.requiresLogin = function(req, res, next) {
|
exports.requiresLogin = function(req, res, next) {
|
||||||
if (!req.isAuthenticated()) {
|
if (!req.isAuthenticated()) {
|
||||||
console.log('\n\nSENDING 401 STATUS\n\n');
|
|
||||||
return res.status(401).send({
|
return res.status(401).send({
|
||||||
message: 'User is not logged in'
|
message: 'User is not logged in'
|
||||||
});
|
});
|
||||||
|
|
|
@ -9,8 +9,7 @@ var should = require('should'),
|
||||||
User = mongoose.model('User'),
|
User = mongoose.model('User'),
|
||||||
Form = mongoose.model('Form'),
|
Form = mongoose.model('Form'),
|
||||||
Field = mongoose.model('Field'),
|
Field = mongoose.model('Field'),
|
||||||
FormSubmission = mongoose.model('FormSubmission'),
|
FormSubmission = mongoose.model('FormSubmission');
|
||||||
agent = request.agent(app);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -25,12 +24,10 @@ describe('Form Routes Unit tests', function() {
|
||||||
|
|
||||||
beforeEach(function(done) {
|
beforeEach(function(done) {
|
||||||
|
|
||||||
//Initialize Session
|
|
||||||
userSession = Session(app);
|
|
||||||
|
|
||||||
// Create user credentials
|
// Create user credentials
|
||||||
credentials = {
|
credentials = {
|
||||||
username: 'test1@test.com',
|
username: 'test@test.com',
|
||||||
|
email: 'test@test.com',
|
||||||
password: 'password'
|
password: 'password'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -39,7 +36,7 @@ describe('Form Routes Unit tests', function() {
|
||||||
firstName: 'Full',
|
firstName: 'Full',
|
||||||
lastName: 'Name',
|
lastName: 'Name',
|
||||||
displayName: 'Full Name',
|
displayName: 'Full Name',
|
||||||
email: 'test5@test.com',
|
email: 'test@test.com',
|
||||||
username: credentials.username,
|
username: credentials.username,
|
||||||
password: credentials.password,
|
password: credentials.password,
|
||||||
provider: 'local'
|
provider: 'local'
|
||||||
|
@ -58,6 +55,10 @@ describe('Form Routes Unit tests', function() {
|
||||||
new Field({'fieldType':'checkbox', 'title':'hockey', 'fieldValue': ''})
|
new Field({'fieldType':'checkbox', 'title':'hockey', 'fieldValue': ''})
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//Initialize Session
|
||||||
|
userSession = Session(app);
|
||||||
|
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -116,14 +117,13 @@ describe('Form Routes Unit tests', function() {
|
||||||
|
|
||||||
// Handle signout error
|
// Handle signout error
|
||||||
if (signoutErr) return done(signoutErr);
|
if (signoutErr) return done(signoutErr);
|
||||||
userSession.destroy();
|
done();
|
||||||
done();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it(' > should not be able to create a Form if not logged in', function(done) {
|
it(' > should not be able to create a Form if not logged in', function(done) {
|
||||||
agent.post('/forms')
|
userSession.post('/forms')
|
||||||
.send({form: myForm})
|
.send({form: myForm})
|
||||||
.expect(401)
|
.expect(401)
|
||||||
.end(function(FormSaveErr, FormSaveRes) {
|
.end(function(FormSaveErr, FormSaveRes) {
|
||||||
|
@ -134,7 +134,7 @@ describe('Form Routes Unit tests', function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
it(' > should not be able to get list of users\' Forms if not logged in', function(done) {
|
it(' > should not be able to get list of users\' Forms if not logged in', function(done) {
|
||||||
agent.get('/forms')
|
userSession.get('/forms')
|
||||||
.expect(401)
|
.expect(401)
|
||||||
.end(function(FormSaveErr, FormSaveRes) {
|
.end(function(FormSaveErr, FormSaveRes) {
|
||||||
(FormSaveRes.body.message).should.equal('User is not logged in');
|
(FormSaveRes.body.message).should.equal('User is not logged in');
|
||||||
|
@ -147,24 +147,23 @@ describe('Form Routes Unit tests', function() {
|
||||||
// Set Form with a invalid title field
|
// Set Form with a invalid title field
|
||||||
myForm.title = '';
|
myForm.title = '';
|
||||||
|
|
||||||
agent.post('http://localhost:3001/auth/signin')
|
userSession.post('/auth/signin')
|
||||||
.send(credentials)
|
.send(credentials)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.end(function(signinErr, signinRes) {
|
.end(function(signinErr, signinRes) {
|
||||||
should.not.exist(signinErr);
|
should.not.exist(signinErr);
|
||||||
|
|
||||||
done();
|
|
||||||
// Save a new Form
|
// Save a new Form
|
||||||
// userSession.post('/forms')
|
userSession.post('/forms')
|
||||||
// .send({form: myForm})
|
.send({form: myForm})
|
||||||
// .expect(400)
|
.expect(400)
|
||||||
// .end(function(FormSaveErr, FormSaveRes) {
|
.end(function(FormSaveErr, FormSaveRes) {
|
||||||
// // Set message assertion
|
// Set message assertion
|
||||||
// (FormSaveRes.body.message).should.equal('Form Title cannot be blank');
|
(FormSaveRes.body.message).should.equal('Form Title cannot be blank');
|
||||||
|
|
||||||
// done();
|
done();
|
||||||
// });
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -217,7 +216,7 @@ describe('Form Routes Unit tests', function() {
|
||||||
FormObj.save(function(err, form) {
|
FormObj.save(function(err, form) {
|
||||||
if(err) return done(err);
|
if(err) return done(err);
|
||||||
|
|
||||||
agent.get('/forms/' + form._id)
|
userSession.get('/forms/' + form._id)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.end(function(err, res) {
|
.end(function(err, res) {
|
||||||
|
@ -261,7 +260,7 @@ describe('Form Routes Unit tests', function() {
|
||||||
if (FormDeleteErr) return done(FormDeleteErr);
|
if (FormDeleteErr) return done(FormDeleteErr);
|
||||||
|
|
||||||
// Set assertions
|
// Set assertions
|
||||||
(FormDeleteRes.body).should.exist();
|
should.exist(FormDeleteRes.body);
|
||||||
// (FormDeleteRes.body._id).should.equal(FormSaveRes.body._id);
|
// (FormDeleteRes.body._id).should.equal(FormSaveRes.body._id);
|
||||||
|
|
||||||
// Call the assertion callback
|
// Call the assertion callback
|
||||||
|
@ -282,7 +281,7 @@ describe('Form Routes Unit tests', function() {
|
||||||
// Save the Form
|
// Save the Form
|
||||||
FormObj.save(function() {
|
FormObj.save(function() {
|
||||||
// Try deleting Form
|
// Try deleting Form
|
||||||
agent.delete('/forms/' + FormObj._id)
|
userSession.delete('/forms/' + FormObj._id)
|
||||||
.expect(401)
|
.expect(401)
|
||||||
.end(function(FormDeleteErr, FormDeleteRes) {
|
.end(function(FormDeleteErr, FormDeleteRes) {
|
||||||
// Set message assertion
|
// Set message assertion
|
||||||
|
@ -295,7 +294,7 @@ describe('Form Routes Unit tests', function() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it(' > should be able to upload a PDF an Form if logged in', function(done) {
|
it(' > should be able to upload a PDF to Form if signed in', function(done) {
|
||||||
userSession.post('/auth/signin')
|
userSession.post('/auth/signin')
|
||||||
.send(credentials)
|
.send(credentials)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
|
@ -322,7 +321,8 @@ describe('Form Routes Unit tests', function() {
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.end(function(FormsGetErr, FormsGetRes) {
|
.end(function(FormsGetErr, FormsGetRes) {
|
||||||
// Handle Form save error
|
console.log('get forms');
|
||||||
|
// Handle Form save error
|
||||||
if (FormsGetErr) return done(FormsGetErr);
|
if (FormsGetErr) return done(FormsGetErr);
|
||||||
|
|
||||||
// Get Forms list
|
// Get Forms list
|
||||||
|
|
|
@ -10,11 +10,6 @@ var should = require('should'),
|
||||||
config = require('../../config/config'),
|
config = require('../../config/config'),
|
||||||
tmpUser = mongoose.model(config.tempUserCollection),
|
tmpUser = mongoose.model(config.tempUserCollection),
|
||||||
url = require('url');
|
url = require('url');
|
||||||
//
|
|
||||||
// var mailosaur = require('mailosaur')(config.mailosaur.key),
|
|
||||||
// mailbox = new mailosaur.Mailbox(config.mailosaur.mailbox_id);
|
|
||||||
//
|
|
||||||
// var mandrill = require('node-mandrill')(config.mailer.options.auth.pass);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Globals
|
* Globals
|
||||||
|
@ -25,19 +20,16 @@ var username, userSession;
|
||||||
|
|
||||||
username = 'testActiveAccount1.be1e58fb@mailosaur.in';
|
username = 'testActiveAccount1.be1e58fb@mailosaur.in';
|
||||||
|
|
||||||
//Initialize Session
|
|
||||||
userSession = Session(app);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Form routes tests
|
* Form routes tests
|
||||||
*/
|
*/
|
||||||
describe('User CRUD tests', function() {
|
describe('User CRUD tests', function() {
|
||||||
//this.timeout(15000);
|
this.timeout(30000);
|
||||||
|
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
// Create user credentials
|
// Create user credentials
|
||||||
credentials = {
|
credentials = {
|
||||||
username: 'be1e58fb@mailosaur.in',
|
username: 'test7@test.com',
|
||||||
password: 'password'
|
password: 'password'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -50,124 +42,69 @@ describe('User CRUD tests', function() {
|
||||||
password: credentials.password,
|
password: credentials.password,
|
||||||
provider: 'local'
|
provider: 'local'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//Initialize Session
|
||||||
|
userSession = Session(app);
|
||||||
});
|
});
|
||||||
|
|
||||||
//describe(' > Create, Verify and Activate a User > ', function() {
|
describe(' > Create, Verify and Activate a User > ', function() {
|
||||||
//this.timeout(15000);
|
//this.timeout(15000);
|
||||||
|
|
||||||
it('should be able to create a temporary (non-activated) User', function(done) {
|
it('should be able to create a temporary (non-activated) User', function(done) {
|
||||||
//_User.email = _User.username = username;
|
|
||||||
userSession.post('/auth/signup')
|
userSession.post('/auth/signup')
|
||||||
.send(_User)
|
.send(_User)
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.end(function(FormSaveErr, FormSaveRes) {
|
.end(function(FormSaveErr, FormSaveRes) {
|
||||||
// Handle error
|
// Handle error
|
||||||
should.not.exist(FormSaveErr);
|
should.not.exist(FormSaveErr);
|
||||||
done();
|
|
||||||
|
tmpUser.findOne({username: _User.username}, function (err, user) {
|
||||||
|
should.not.exist(err);
|
||||||
|
should.exist(user);
|
||||||
|
_tmpUser = user;
|
||||||
|
|
||||||
// // mandrill('/messages/search', {
|
_User.username.should.equal(user.username);
|
||||||
// // query: "subject:Confirm",
|
_User.firstName.should.equal(user.firstName);
|
||||||
// // senders: [
|
_User.lastName.should.equal(user.lastName);
|
||||||
// // "test@forms.polydaic.com"
|
activateToken = user.GENERATED_VERIFYING_URL;
|
||||||
// // ],
|
console.log('activateToken: '+activateToken);
|
||||||
// // limit: 1
|
|
||||||
// // }, function(error, emails) {
|
userSession.get('/auth/verify/'+activateToken)
|
||||||
// // if (error) console.log( JSON.stringify(error) );
|
.expect(200)
|
||||||
|
.end(function(VerifyErr, VerifyRes) {
|
||||||
|
// Handle error
|
||||||
|
if (VerifyErr) return done(VerifyErr);
|
||||||
|
(VerifyRes.text).should.equal('User successfully verified');
|
||||||
|
|
||||||
|
userSession.post('/auth/signin')
|
||||||
|
.send(credentials)
|
||||||
|
.expect('Content-Type', /json/)
|
||||||
|
.expect(200)
|
||||||
|
.end(function(signinErr, signinRes) {
|
||||||
|
// Handle signin error
|
||||||
|
if (signinErr) return done(signinErr);
|
||||||
|
|
||||||
// // var confirmation_email = emails[0];
|
var user = signinRes.body;
|
||||||
|
(user.username).should.equal(credentials.username);
|
||||||
|
|
||||||
// // mandrill('/messages/content', {
|
userSession.get('/auth/signout')
|
||||||
// // id: confirmation_email._id
|
.expect(200)
|
||||||
// // }, function(error, email) {
|
.end(function(signoutErr, signoutRes) {
|
||||||
// // if (error) console.log( JSON.stringify(error) );
|
|
||||||
|
|
||||||
// // // console.log(email);
|
// Handle signout error
|
||||||
// // var link = _(email.text.split('\n')).reverse().value()[1];
|
if (signoutErr) return done(signoutErr);
|
||||||
// // console.log(link);
|
|
||||||
// // activateToken = _(url.parse(link).hash.split('/')).reverse().value()[0];
|
|
||||||
// // console.log('actual activateToken: '+ activateToken);
|
|
||||||
// // console.log('expected activateToken: ' + user.GENERATED_VERIFYING_URL);
|
|
||||||
|
|
||||||
// // done();
|
(signoutRes.text).should.equal('You have successfully logged out.');
|
||||||
|
|
||||||
// // });
|
done();
|
||||||
// // });
|
});
|
||||||
|
});
|
||||||
// // mailbox.getEmails(function(err, _emails) {
|
});
|
||||||
// // if(err) done(err);
|
});
|
||||||
|
|
||||||
// // var emails = _emails;
|
|
||||||
|
|
||||||
// // console.log('mailbox.getEmails:');
|
|
||||||
// // console.log(emails[0].text.links);
|
|
||||||
|
|
||||||
// // var link = emails[0].text.links[0].href;
|
|
||||||
// // activateToken = _(url.parse(link).hash.split('/')).reverse().value()[0];
|
|
||||||
// // console.log('actual activateToken: '+ activateToken);
|
|
||||||
// // console.log('expected activateToken: ' + user.GENERATED_VERIFYING_URL);
|
|
||||||
// // (activateToken).should.equal(user.GENERATED_VERIFYING_URL);
|
|
||||||
|
|
||||||
// // done();
|
|
||||||
// // });
|
|
||||||
// });
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should produce valid activation token', function(done) {
|
});
|
||||||
console.log('activation token');
|
|
||||||
tmpUser.findOne({username: _User.username}, function (err, user) {
|
|
||||||
should.not.exist(err);
|
|
||||||
should.exist(user);
|
|
||||||
_tmpUser = user;
|
|
||||||
|
|
||||||
_User.username.should.equal(user.username);
|
|
||||||
_User.firstName.should.equal(user.firstName);
|
|
||||||
_User.lastName.should.equal(user.lastName);
|
|
||||||
activateToken = user.GENERATED_VERIFYING_URL;
|
|
||||||
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should be able to verify a User Account', function(done) {
|
|
||||||
//console.log('activateToken: '+activateToken);
|
|
||||||
userSession.get('/auth/verify/'+activateToken)
|
|
||||||
.expect(200)
|
|
||||||
.end(function(VerifyErr, VerifyRes) {
|
|
||||||
// Handle error
|
|
||||||
if (VerifyErr) return done(VerifyErr);
|
|
||||||
(VerifyRes.text).should.equal('User successfully verified');
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should be able to login and logout a verified User Account', function(done) {
|
|
||||||
userSession.post('/auth/signin')
|
|
||||||
.send(credentials)
|
|
||||||
.expect('Content-Type', /json/)
|
|
||||||
.expect(200)
|
|
||||||
.end(function(signinErr, signinRes) {
|
|
||||||
// Handle signin error
|
|
||||||
if (signinErr) return done(signinErr);
|
|
||||||
|
|
||||||
var user = signinRes.body;
|
|
||||||
(user.username).should.equal(credentials.username);
|
|
||||||
|
|
||||||
userSession.get('/auth/signout')
|
|
||||||
.expect(200)
|
|
||||||
.end(function(signoutErr, signoutRes) {
|
|
||||||
|
|
||||||
// Handle signout error
|
|
||||||
if (signoutErr) return done(signoutErr);
|
|
||||||
|
|
||||||
(signoutRes.text).should.equal('Successfully logged out');
|
|
||||||
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
//});
|
|
||||||
|
|
||||||
it(' > should be able to reset a User\'s password');
|
it(' > should be able to reset a User\'s password');
|
||||||
|
|
||||||
|
@ -176,11 +113,8 @@ describe('User CRUD tests', function() {
|
||||||
afterEach(function(done) {
|
afterEach(function(done) {
|
||||||
User.remove().exec(function () {
|
User.remove().exec(function () {
|
||||||
tmpUser.remove().exec(function(){
|
tmpUser.remove().exec(function(){
|
||||||
// mailbox.deleteAllEmail(function (err, body) {
|
userSession.destroy();
|
||||||
// if(err) throw err;
|
done();
|
||||||
//userSession.destroy();
|
|
||||||
done();
|
|
||||||
// });
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
module.exports = function(grunt) {
|
module.exports = function(grunt) {
|
||||||
require('jit-grunt')(grunt);
|
require('jit-grunt')(grunt);
|
||||||
|
|
||||||
grunt.loadNpmTasks('grunt-env');
|
|
||||||
|
|
||||||
// Unified Watch Object
|
// Unified Watch Object
|
||||||
var watchFiles = {
|
var watchFiles = {
|
||||||
serverViews: ['app/views/**/*.*'],
|
serverViews: ['app/views/**/*.*'],
|
||||||
|
@ -145,6 +143,7 @@ module.exports = function(grunt) {
|
||||||
env: {
|
env: {
|
||||||
test: {
|
test: {
|
||||||
NODE_ENV: 'test',
|
NODE_ENV: 'test',
|
||||||
|
src: '/opt/deploy/.env'
|
||||||
},
|
},
|
||||||
secure: {
|
secure: {
|
||||||
NODE_ENV: 'secure',
|
NODE_ENV: 'secure',
|
||||||
|
|
2
public/dist/application.min.css
vendored
2
public/dist/application.min.css
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue