Add test for toKeyValue() - true values should be composed to flag

This commit is contained in:
Vojta Jina 2010-10-16 16:15:08 +01:00 committed by Igor Minar
parent 732bcd8a36
commit 46c6406b25

View file

@ -114,4 +114,8 @@ describe('toKeyValue', function() {
toEqual('escaped%20key=escaped%20value');
expect(toKeyValue({emptyKey: ''})).toEqual('emptyKey=');
});
it('should parse true values into flags', function() {
expect(toKeyValue({flag1: true, key: 'value', flag2: true})).toEqual('flag1&key=value&flag2');
});
});