Browse Source

Add more tests without spaces

pull/502/head
Diana Shkolnikov 9 years ago
parent
commit
05f4374b0a
  1. 9
      test/unit/helper/text_parser.js

9
test/unit/helper/text_parser.js

@ -29,6 +29,15 @@ module.exports.tests.split_on_comma = function(test, common) {
t.equal(address.admin_parts, query.admin_parts, 'admin_parts set correctly to ' + address.admin_parts);
t.end();
});
test('naive parsing ' + query + 'without spaces', function(t) {
var address = parser.get_parsed_address(query.name + ',' + query.admin_parts);
t.equal(typeof address, 'object', 'valid object');
t.equal(address.name, query.name, 'name set correctly to ' + address.name);
t.equal(address.admin_parts, query.admin_parts, 'admin_parts set correctly to ' + address.admin_parts);
t.end();
});
});
};

Loading…
Cancel
Save