Add regression test for adapter's empty field handling

This commit is contained in:
Tim Mickel 2016-06-14 18:14:15 -04:00
parent 7427fe4ff3
commit 9f89caa0e6
2 changed files with 13 additions and 0 deletions

View file

@ -53,5 +53,11 @@
"xml": { "xml": {
"outerHTML": "></xml>" "outerHTML": "></xml>"
} }
},
"createemptyfield": {
"name": "block",
"xml": {
"outerHTML": "<block type='operator_equals' id='l^H_{8[DDyDW?m)HIt@b' x='100' y='362'><value name='OPERAND1'><shadow type='text' id='Ud@4y]bc./]uv~te?brb'><field name='TEXT'></field></shadow></value><value name='OPERAND2'><shadow type='text' id='p8[y..,[K;~G,k7]N;08'><field name='TEXT'></field></shadow></value></block>"
}
} }
} }

View file

@ -165,3 +165,10 @@ test('create with invalid xml', function (t) {
t.equal(result.length, 0); t.equal(result.length, 0);
t.end(); t.end();
}); });
test('create with empty field', function (t) {
var result = adapter(events.createemptyfield);
t.ok(Array.isArray(result));
t.equal(result.length, 3);
t.end();
});