diff options
| author | Vojta Jina | 2012-08-04 12:11:00 -0700 | 
|---|---|---|
| committer | Igor Minar | 2012-08-10 16:17:59 -0700 | 
| commit | e0a54f6b206dc2b6595f2bc3a17c5932e7477545 (patch) | |
| tree | 4db991fbffe6258f52e59a47039f0aea8fab3341 /test/ng/httpSpec.js | |
| parent | 9767f7bdd3e1ce6f65bdea992d67369ead13d813 (diff) | |
| download | angular.js-e0a54f6b206dc2b6595f2bc3a17c5932e7477545.tar.bz2 | |
feat($http): support reponseType
Closes #1013
Diffstat (limited to 'test/ng/httpSpec.js')
| -rw-r--r-- | test/ng/httpSpec.js | 9 | 
1 files changed, 6 insertions, 3 deletions
| diff --git a/test/ng/httpSpec.js b/test/ng/httpSpec.js index bb4de3c1..f7df3d4b 100644 --- a/test/ng/httpSpec.js +++ b/test/ng/httpSpec.js @@ -959,12 +959,13 @@ describe('$http', function() {    }); -  it('should pass timeout and withCredentials', function() { +  it('should pass timeout, withCredentials and responseType', function() {      var $httpBackend = jasmine.createSpy('$httpBackend'); -    $httpBackend.andCallFake(function(m, u, d, c, h, timeout, withCredentials) { +    $httpBackend.andCallFake(function(m, u, d, c, h, timeout, withCredentials, responseType) {        expect(timeout).toBe(12345);        expect(withCredentials).toBe(true); +      expect(responseType).toBe('json');      });      module(function($provide) { @@ -972,7 +973,9 @@ describe('$http', function() {      });      inject(function($http) { -      $http({method: 'GET', url: 'some.html', timeout: 12345, withCredentials: true}); +      $http({ +        method: 'GET', url: 'some.html', timeout: 12345, withCredentials: true, responseType: 'json' +      });        expect($httpBackend).toHaveBeenCalledOnce();      }); | 
