aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorBoris Serdyuk2014-02-19 15:14:14 +0400
committerIgor Minar2014-02-21 14:51:10 -0800
commitc8e03e34b27a8449d8e1bfe0e3801d6a67ae2c49 (patch)
treec480b17472ecb25edb512bba9d4d3ddb6ec2a181 /test
parent267b217376ed466e9f260ecfdfa15a8227c103ff (diff)
downloadangular.js-c8e03e34b27a8449d8e1bfe0e3801d6a67ae2c49.tar.bz2
fix($http): do not add trailing question
Closes #6342
Diffstat (limited to 'test')
-rw-r--r--test/ng/httpSpec.js5
-rw-r--r--test/ngResource/resourceSpec.js2
2 files changed, 6 insertions, 1 deletions
diff --git a/test/ng/httpSpec.js b/test/ng/httpSpec.js
index d446a80c..192fde5c 100644
--- a/test/ng/httpSpec.js
+++ b/test/ng/httpSpec.js
@@ -456,6 +456,11 @@ describe('$http', function() {
$httpBackend.expect('GET', '/Path?!do%26h=g%3Da+h&:bar=$baz@1').respond('');
$http({url: '/Path', params: {':bar': '$baz@1', '!do&h': 'g=a h'}, method: 'GET'});
});
+
+ it('should not add question mark when params is empty', function() {
+ $httpBackend.expect('GET', '/url').respond('');
+ $http({url: '/url', params: {}, method: 'GET'});
+ })
});
diff --git a/test/ngResource/resourceSpec.js b/test/ngResource/resourceSpec.js
index 1c0b73b9..13317155 100644
--- a/test/ngResource/resourceSpec.js
+++ b/test/ngResource/resourceSpec.js
@@ -330,7 +330,7 @@ describe("resource", function() {
it('should not throw TypeError on null default params', function() {
- $httpBackend.expect('GET', '/Path?').respond('{}');
+ $httpBackend.expect('GET', '/Path').respond('{}');
var R = $resource('/Path', {param: null}, {get: {method: 'GET'}});
expect(function() {