diff options
| author | Andrew McLeod | 2013-02-25 21:25:18 -0800 |
|---|---|---|
| committer | Igor Minar | 2013-02-26 17:29:08 -0800 |
| commit | b13da18e11d5f67696906d1ecd2fc9e753d50da4 (patch) | |
| tree | e3dbb159ec82c59d290b68a541078fa85a6ffdaf /test/ngResource/resourceSpec.js | |
| parent | f98f8a3892874382efbd42eded01c94c76188e56 (diff) | |
| download | angular.js-b13da18e11d5f67696906d1ecd2fc9e753d50da4.tar.bz2 | |
fix($http): don't encode URL query substring "null" to "+"
Fixes issue in encodeUriQuery used by $http and $resource that
treats null as a string and replaces the characters "null" with "+".
Diffstat (limited to 'test/ngResource/resourceSpec.js')
| -rw-r--r-- | test/ngResource/resourceSpec.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ngResource/resourceSpec.js b/test/ngResource/resourceSpec.js index bfed3082..768ffd77 100644 --- a/test/ngResource/resourceSpec.js +++ b/test/ngResource/resourceSpec.js @@ -122,6 +122,12 @@ describe("resource", function() { R.get({a: 'doh@fo o', ':bar': '$baz@1', '!do&h': 'g=a h'}); }); + it('should not encode string "null" to "+" in url params', function() { + var R = $resource('/Path/:a'); + $httpBackend.expect('GET', '/Path/null').respond('{}'); + R.get({a: 'null'}); + }); + it('should allow relative paths in resource url', function () { var R = $resource(':relativePath'); $httpBackend.expect('GET', 'data.json').respond('{}'); |
