diff options
| author | Vojta Jina | 2011-05-31 10:23:30 +0200 |
|---|---|---|
| committer | Vojta Jina | 2011-05-31 10:23:30 +0200 |
| commit | b2f5299e0e3d6e4892b7fcc37686012147bf0afa (patch) | |
| tree | 91de2744a4898517fb8e3abe9654261f16dadfa3 /test | |
| parent | 805e083c243655bfaed3c5431dc0f402cb27fcb4 (diff) | |
| download | angular.js-b2f5299e0e3d6e4892b7fcc37686012147bf0afa.tar.bz2 | |
Normalize IE XHR bug (status code 1223 to 204)
See http://bugs.jquery.com/ticket/1450
Diffstat (limited to 'test')
| -rw-r--r-- | test/BrowserSpecs.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/BrowserSpecs.js b/test/BrowserSpecs.js index 45fb0ed9..45e5f6be 100644 --- a/test/BrowserSpecs.js +++ b/test/BrowserSpecs.js @@ -124,6 +124,19 @@ describe('browser', function(){ expect(response).toEqual('RESPONSE'); }); + it('should normalize IE\'s 1223 status code into 204', function() { + var callback = jasmine.createSpy('XHR'); + + browser.xhr('GET', 'URL', 'POST', callback); + + xhr.status = 1223; + xhr.readyState = 4; + xhr.onreadystatechange(); + + expect(callback).toHaveBeenCalled(); + expect(callback.argsForCall[0][0]).toEqual(204); + }); + it('should not set Content-type header for GET requests', function() { browser.xhr('GET', 'URL', 'POST-DATA', function(c, r) {}); |
