aboutsummaryrefslogtreecommitdiffstats
path: root/test/ngResource/resourceSpec.js
diff options
context:
space:
mode:
authorCaitlin Potter2014-01-27 14:04:45 -0500
committerCaitlin Potter2014-02-03 11:12:07 -0500
commitce1f1f97f0ebf77941b2bdaf5e8352d33786524d (patch)
treebe15f6e2395b79dc4348ca7cf5681714e8b4cceb /test/ngResource/resourceSpec.js
parent8205158e477f1ea235feba3087143e0d3e5e52ec (diff)
downloadangular.js-ce1f1f97f0ebf77941b2bdaf5e8352d33786524d.tar.bz2
fix(ngResource): don't append number to '$' in url param value when encoding URI
Previously, if a URL parameter value included a $, it would replace the dollar sign with a literal '$1' for mysterious reasons. Using a function rather than a replacement string circumvents this behaviour and produces a more expected result. Closes #6003 Closes #6004
Diffstat (limited to 'test/ngResource/resourceSpec.js')
-rw-r--r--test/ngResource/resourceSpec.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ngResource/resourceSpec.js b/test/ngResource/resourceSpec.js
index b23f0ca4..08c27a0f 100644
--- a/test/ngResource/resourceSpec.js
+++ b/test/ngResource/resourceSpec.js
@@ -178,9 +178,11 @@ describe("resource", function() {
$httpBackend.expect('GET', '/Path/foo%231').respond('{}');
$httpBackend.expect('GET', '/Path/doh!@foo?bar=baz%231').respond('{}');
+ $httpBackend.expect('GET', '/Path/herp$').respond('{}');
R.get({a: 'foo#1'});
R.get({a: 'doh!@foo', bar: 'baz#1'});
+ R.get({a: 'herp$'});
});