Browse Source

updated filename

pull/666/head
Stephen Hess 9 years ago
parent
commit
42affa80f8
  1. 2
      sanitiser/search_fallback.js
  2. 18
      test/unit/sanitiser/search_fallback.js

2
sanitiser/search_fallback.js

@ -1,6 +1,6 @@
var sanitizeAll = require('../sanitiser/sanitizeAll'),
sanitizers = {
text: require('../sanitiser/_text_autocomplete')
text: require('../sanitiser/_text_addressit')
};
var sanitize = function(req, cb) { sanitizeAll(req, sanitizers, cb); };

18
test/unit/sanitiser/search_fallback.js

@ -9,14 +9,14 @@ module.exports.tests.sanitize = function(test, common) {
// rather than re-verify the functionality of all the sanitisers, this test just verifies that they
// were all called correctly
var search = proxyquire('../../../sanitiser/search_fallback', {
'../sanitiser/_text_autocomplete': function() {
called_sanitisers.push('_text_autocomplete');
'../sanitiser/_text_addressit': function() {
called_sanitisers.push('_text_addressit');
return { errors: [], warnings: [] };
}
});
var expected_sanitisers = [
'_text_autocomplete'
'_text_addressit'
];
var req = {};
@ -34,14 +34,14 @@ module.exports.tests.sanitize = function(test, common) {
// rather than re-verify the functionality of all the sanitisers, this test just verifies that they
// were all called correctly
var search = proxyquire('../../../sanitiser/search_fallback', {
'../sanitiser/_text_autocomplete': function() {
called_sanitisers.push('_text_autocomplete');
'../sanitiser/_text_addressit': function() {
called_sanitisers.push('_text_addressit');
return { errors: [], warnings: [] };
}
});
var expected_sanitisers = [
'_text_autocomplete'
'_text_addressit'
];
var req = {};
@ -60,14 +60,14 @@ module.exports.tests.sanitize = function(test, common) {
// rather than re-verify the functionality of all the sanitisers, this test just verifies that they
// were all called correctly
var search = proxyquire('../../../sanitiser/search_fallback', {
'../sanitiser/_text_autocomplete': function() {
called_sanitisers.push('_text_autocomplete');
'../sanitiser/_text_addressit': function() {
called_sanitisers.push('_text_addressit');
return { errors: [], warnings: [] };
}
});
var expected_sanitisers = [
'_text_autocomplete'
'_text_addressit'
];
var req = {};

Loading…
Cancel
Save