Removed shadow variables from form_submission route tests

This commit is contained in:
David Baldwynn 2017-04-20 21:49:27 -07:00 committed by GitHub
parent 98df16c76c
commit cbef0023cd

View file

@ -56,8 +56,8 @@ describe('Form Submission Routes Unit tests', function() {
] ]
}); });
FormObj.save(function(err, form) { FormObj.save(function(formSaveErr, form) {
if (err) done(err); if (formSaveErr) done(formSaveErr);
_Submission = { _Submission = {
form_fields: [ form_fields: [
@ -116,10 +116,10 @@ describe('Form Submission Routes Unit tests', function() {
submissionSession.get('/forms/' + FormObj._id + '/submissions') submissionSession.get('/forms/' + FormObj._id + '/submissions')
.expect('Content-Type', /json/) .expect('Content-Type', /json/)
.expect(200) .expect(200)
.end(function(err, res) { .end(function(submissionErr, res) {
// Set assertion // Set assertion
should.not.exist(err); should.not.exist(submissionErr);
// Call the assertion callback // Call the assertion callback
done(); done();
@ -150,10 +150,10 @@ describe('Form Submission Routes Unit tests', function() {
submissionSession.delete('/forms/' + FormObj._id + '/submissions') submissionSession.delete('/forms/' + FormObj._id + '/submissions')
.send({deleted_submissions: submission_ids}) .send({deleted_submissions: submission_ids})
.expect(200) .expect(200)
.end(function(err, res) { .end(function(submissionErr, res) {
// Set assertions // Set assertions
should.not.exist(err); should.not.exist(submissionErr);
(res.text).should.equal('Form submissions successfully deleted'); (res.text).should.equal('Form submissions successfully deleted');
// Call the assertion callback // Call the assertion callback
@ -188,10 +188,10 @@ describe('Form Submission Routes Unit tests', function() {
submissionSession.delete('/forms/' + FormObj._id + '/submissions') submissionSession.delete('/forms/' + FormObj._id + '/submissions')
.send({deleted_submissions: submission_ids}) .send({deleted_submissions: submission_ids})
.expect(401) .expect(401)
.end(function (err, res) { .end(function (submissionErr, res) {
// Set assertions // Set assertions
should.not.exist(err); should.not.exist(submissionErr);
// Call the assertion callback // Call the assertion callback
done(); done();