|
|
|
@ -133,7 +133,7 @@ module.exports.tests.sanitize_details = function(test, common) {
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
var valid_values = [true, 'true', 1, '1', 'yes', 'y']; |
|
|
|
|
var valid_values = [true, 'true', 1, '1']; |
|
|
|
|
valid_values.forEach(function(details) { |
|
|
|
|
test('valid details param ' + details, function(t) { |
|
|
|
|
sanitize({ 'point.lat': 0, 'point.lon': 0, details: details }, function( err, clean ){ |
|
|
|
@ -150,7 +150,7 @@ module.exports.tests.sanitize_details = function(test, common) {
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
var valid_false_values = ['false', false, 0, '0', 'no', 'n']; |
|
|
|
|
var valid_false_values = ['false', false, 0, '0']; |
|
|
|
|
valid_false_values.forEach(function(details) { |
|
|
|
|
test('test setting false explicitly ' + details, function(t) { |
|
|
|
|
sanitize({ 'point.lat': 0, 'point.lon': 0, details: details }, function( err, clean ){ |
|
|
|
|