aboutsummaryrefslogtreecommitdiffstats
path: root/test/AngularSpec.js
diff options
context:
space:
mode:
authorVojta Jina2010-10-16 16:15:08 +0100
committerIgor Minar2010-10-16 22:10:01 -0700
commit46c6406b259556c7bdf82b6d8d0f3adfbf4bf686 (patch)
tree85a99a19c98e04eb1f70b101e0b6ddcc59059c79 /test/AngularSpec.js
parent732bcd8a368d50995c796373e37be5a4d3b2bc8c (diff)
downloadangular.js-46c6406b259556c7bdf82b6d8d0f3adfbf4bf686.tar.bz2
Add test for toKeyValue() - true values should be composed to flag
Diffstat (limited to 'test/AngularSpec.js')
-rw-r--r--test/AngularSpec.js4
1 files changed, 4 insertions, 0 deletions
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');
+ });
});