Browse Source

Reformat test for clarity

pull/273/head
Julian Simioni 9 years ago
parent
commit
9d21832874
  1. 7
      test/unit/sanitiser/_ids.js

7
test/unit/sanitiser/_ids.js

@ -100,16 +100,17 @@ module.exports.tests.valid_ids = function(test, common) {
t.end();
});
test('ids: valid input with multiple of values' , function(t) {
test('ids: valid input with multiple values' , function(t) {
var raw = { ids: inputs.valid.join(',') };
var clean = {};
var expected_clean={
ids: [],
};
// construct the expected id and type for each valid input
inputs.valid.forEach( function( input ){
var input_parts = input.split(delimiter);
expected_clean.ids.push({ id: input_parts[1], type: input_parts[0] });
});
var raw = { ids: inputs.valid.join(',') };
var clean = {};
var messages = sanitize( raw, clean );

Loading…
Cancel
Save