Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 4b86e5d

Browse files
committed
test($http): paramSerializers should sort alphabetically
1 parent a69251a commit 4b86e5d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/ng/httpSpec.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1999,6 +1999,11 @@ describe('$http param serializers', function() {
19991999
expect(jqrSer({someDate: new Date('2014-07-15T17:30:00.000Z')})).toEqual('someDate=2014-07-15T17:30:00.000Z');
20002000
});
20012001

2002+
2003+
it('should sort the request params alphabetically', function() {
2004+
expect(defSer({b: 'b', a: 'a'})).toEqual('a=a&b=b');
2005+
expect(jqrSer({b: 'b', a: 'a'})).toEqual('a=a&b=b');
2006+
});
20022007
});
20032008

20042009
describe('default array serialization', function() {
@@ -2026,5 +2031,4 @@ describe('$http param serializers', function() {
20262031
//a[]=b&a[][c]=d&e[f]=g&e[h][]=i&e[h][]=j
20272032
});
20282033
});
2029-
20302034
});

0 commit comments

Comments
 (0)