jshint fixes

This commit is contained in:
Luis Bosque 2015-03-25 18:39:45 +01:00
parent 373dca0733
commit 6874ef823a

View File

@ -77,7 +77,7 @@ suite('health checks', function() {
test('error if disabled file exists', function(done) {
var fs = require('fs');
readFileFn = fs.readFile
var readFileFn = fs.readFile;
fs.readFile = function(filename, callback) {
callback(null, "Maintenance");
}
@ -85,23 +85,23 @@ suite('health checks', function() {
assert.equal(err.message, "Maintenance");
assert.equal(err.http_status, 503);
done();
});
fs.readFile = readFileFn;
});
});
test('not err if disabled file does not exists', function(done) {
var fs = require('fs');
readFileFn = fs.readFile
var readFileFn = fs.readFile;
fs.readFile = function(filename, callback) {
throw "ENOENT"
callback(new Error("ENOENT"), null);
}
healthCheck.check('fake', 'select 1', function(err, result) {
assert.equal(err, null);
done();
});
fs.readFile = readFileFn;
});
});
function mockGetAllUserDBParams(func) {
metadataBackend.getAllUserDBParams = func;