2015-09-24 14:01:30 +00:00
|
|
|
|
|
|
|
test( 'form trim checks', function() {
|
|
|
|
|
|
|
|
var el = $('#form1')
|
|
|
|
var test_params = {
|
|
|
|
input1: '',
|
|
|
|
input2: '',
|
|
|
|
input3: 'a',
|
|
|
|
input4: 'a b',
|
|
|
|
input5: 'äö ü',
|
2015-09-24 18:33:31 +00:00
|
|
|
input6: [
|
|
|
|
'a',
|
|
|
|
'b',
|
|
|
|
'c',
|
|
|
|
'd'
|
|
|
|
],
|
2015-09-24 14:01:30 +00:00
|
|
|
textarea1: '',
|
|
|
|
textarea2: '',
|
|
|
|
textarea3: 'a',
|
|
|
|
textarea4: "test\r\n\r\n 123",
|
|
|
|
ce1: 'lala',
|
|
|
|
ce2: "la\nla",
|
|
|
|
}
|
|
|
|
|
|
|
|
el.find('[contenteditable]').ce({
|
|
|
|
mode: 'richtext'
|
|
|
|
})
|
|
|
|
|
|
|
|
var params = App.ControllerForm.params( el )
|
|
|
|
|
|
|
|
deepEqual( params, test_params, 'form param check' )
|
2015-09-24 18:33:31 +00:00
|
|
|
|
2015-09-24 14:01:30 +00:00
|
|
|
})
|