Revision 19330e9d
Von Sven Schöling vor mehr als 7 Jahren hinzugefügt
js/t/kivi/parse_amount.js | ||
---|---|---|
QUnit.test("kivi.parse_amount function German number style with thousand separator & contains invalid characters", function( assert ) {
|
||
kivi.setup_formats({ numbers: '1.000,00' });
|
||
|
||
assert.equal(kivi.parse_amount('iuh !@#$% 10,00'), 0, 'iuh !@#$% 10,00');
|
||
assert.equal(kivi.parse_amount('iuh !@#$% 10,00'), undefined, 'iuh !@#$% 10,00');
|
||
});
|
||
|
||
QUnit.test("kivi.parse_amount function German number style with thousand separator & invalid math expression", function( assert ) {
|
||
kivi.setup_formats({ numbers: '1.000,00' });
|
||
|
||
assert.equal(kivi.parse_amount('54--42'), 0, '54--42');
|
||
assert.equal(kivi.parse_amount('54--42'), undefined, '54--42');
|
||
});
|
Auch abrufbar als: Unified diff
kivi.Validator: Tests auf strikteres parse_amount geändert