Sha256: fbc8b3476bc83f6b38124523d56dafe4d7d38750f2a7e38d1b78ecd273fb6c45
Contents?: true
Size: 1013 Bytes
Versions: 1
Compression:
Stored size: 1013 Bytes
Contents
describe('parseParams', function(){ beforeEach(module('robeaux')); it('should set param name to value', function(){ var form = [ { 'name': 'bool', 'value': 'TRUE', 'type': 'boolean' }, { 'name': 'boole', 'value': 'sadg', 'type': 'boolean' }, { 'name': 'str', 'value': 'isOn', 'type': 'string' }, { 'name': 'num', 'value': 100, 'type': 'number' } ]; var params = parseParams(form); expect(params['num']).toEqual(100); expect(params['bool']).toEqual(true); expect(params['boole']).toEqual(false); expect(params['str']).toEqual('isOn'); }); it('should set empty params to true', function(){ var form = [ { 'name': '', 'value': '', 'type': 'boolean' }, { 'name': '21', 'value': '12','type': 'boolean' }, ]; expect(paramsAreEmpty([form[1]])).toEqual(false); expect(paramsAreEmpty([form[0]])).toEqual(true); }); });
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
robeaux-0.3.0 | test/functions/functions.js |