aboutsummaryrefslogtreecommitdiffstats
path: root/test/ResourceSpec.js
diff options
context:
space:
mode:
authorIgor Minar2011-03-31 21:45:28 -0700
committerIgor Minar2011-03-31 21:45:28 -0700
commit78a0f41058a3c8094cf3b8979baa212a3b88b2a6 (patch)
tree65ea56de5dc593a7897c36ede315960db5d129fb /test/ResourceSpec.js
parenteccd9bfbb3d63731814941789089e1c799005fb4 (diff)
downloadangular.js-78a0f41058a3c8094cf3b8979baa212a3b88b2a6.tar.bz2
encode query params correctly but not too agressively
Diffstat (limited to 'test/ResourceSpec.js')
-rw-r--r--test/ResourceSpec.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/ResourceSpec.js b/test/ResourceSpec.js
index 663b163d..e055beab 100644
--- a/test/ResourceSpec.js
+++ b/test/ResourceSpec.js
@@ -49,14 +49,14 @@ describe("resource", function() {
});
it('should not encode @ in url params', function() {
- //encodeURIComponent is too agressive and doesn't follow http://www.ietf.org/rfc/rfc2396.txt
+ //encodeURIComponent is too agressive and doesn't follow http://www.ietf.org/rfc/rfc3986.txt
//with regards to the character set (pchar) allowed in path segments
//so we need this test to make sure that we don't over-encode the params and break stuff like
//buzz api which uses @self
var R = resource.route('/Path/:a');
- xhr.expectGET('/Path/doh@foo?bar=baz%401').respond({});
- R.get({a: 'doh@foo', bar: 'baz@1'});
+ xhr.expectGET('/Path/doh@fo%20o?!do%26h=g%3Da+h&:bar=$baz@1').respond({});
+ R.get({a: 'doh@fo o', ':bar': '$baz@1', '!do&h': 'g=a h'});
});
it('should encode & in url params', function() {