fix($http): do not add trailing question

Closes #6342
This commit is contained in:
Boris Serdyuk
2014-02-19 15:14:14 +04:00
committed by Igor Minar
parent 267b217376
commit c8e03e34b2
3 changed files with 10 additions and 2 deletions

View File

@@ -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'});
})
});