From 46c6406b259556c7bdf82b6d8d0f3adfbf4bf686 Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Sat, 16 Oct 2010 16:15:08 +0100 Subject: Add test for toKeyValue() - true values should be composed to flag --- test/AngularSpec.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/AngularSpec.js') diff --git a/test/AngularSpec.js b/test/AngularSpec.js index 64fd8997..255da3bb 100644 --- a/test/AngularSpec.js +++ b/test/AngularSpec.js @@ -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'); + }); }); -- cgit v1.2.3