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

Commit f8fbd72

Browse files
committed
test(ngResource): test query url params encoding
Make sure to test query url parameters encoding
1 parent 6333d65 commit f8fbd72

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/ngResource/resourceSpec.js

+7
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,13 @@ describe("resource", function() {
330330
});
331331

332332

333+
it('should handle url encoding in mapped params', function() {
334+
var R = $resource('/api/myapp/resource?from=:from');
335+
$httpBackend.expect('GET', '/api/myapp/resource?from=bar%20%26%20blanks').respond({});
336+
R.get({from: 'bar & blanks'});
337+
});
338+
339+
333340
it('should build resource with default param', function() {
334341
$httpBackend.expect('GET', '/Order/123/Line/456.visa?minimum=0.05').respond({id: 'abc'});
335342
var LineItem = $resource('/Order/:orderId/Line/:id:verb',

0 commit comments

Comments
 (0)