From 45f47ff6cd264dcd347e6df92c9ef39b0ae8aaba Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Wed, 10 Aug 2011 15:59:55 +0200 Subject: fix($browser.xhr): change method "JSON" to "JSONP" Breaks "JSON" xhr method is now called "JSONP" --- test/service/browserSpecs.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/service') diff --git a/test/service/browserSpecs.js b/test/service/browserSpecs.js index 7e50a280..41f17f2a 100644 --- a/test/service/browserSpecs.js +++ b/test/service/browserSpecs.js @@ -111,7 +111,7 @@ describe('browser', function() { }); describe('xhr', function() { - describe('JSON', function() { + describe('JSONP', function() { var log; function callback(code, data) { @@ -129,7 +129,7 @@ describe('browser', function() { it('should add script tag for JSONP request', function() { var notify = jasmine.createSpy('notify'); - browser.xhr('JSON', 'http://example.org/path?cb=JSON_CALLBACK', null, callback); + browser.xhr('JSONP', 'http://example.org/path?cb=JSON_CALLBACK', null, callback); browser.notifyWhenNoOutstandingRequests(notify); expect(notify).not.toHaveBeenCalled(); expect(scripts.length).toEqual(1); @@ -148,7 +148,7 @@ describe('browser', function() { it('should call callback when script fails to load', function() { - browser.xhr('JSON', 'http://example.org/path?cb=JSON_CALLBACK', null, callback); + browser.xhr('JSONP', 'http://example.org/path?cb=JSON_CALLBACK', null, callback); var script = scripts[0]; expect(typeof script.onload).toBe('function'); expect(typeof script.onerror).toBe('function'); @@ -160,7 +160,7 @@ describe('browser', function() { it('should update the outstandingRequests counter for successful requests', function() { var notify = jasmine.createSpy('notify'); - browser.xhr('JSON', 'http://example.org/path?cb=JSON_CALLBACK', null, callback); + browser.xhr('JSONP', 'http://example.org/path?cb=JSON_CALLBACK', null, callback); browser.notifyWhenNoOutstandingRequests(notify); expect(notify).not.toHaveBeenCalled(); @@ -175,7 +175,7 @@ describe('browser', function() { it('should update the outstandingRequests counter for failed requests', function() { var notify = jasmine.createSpy('notify'); - browser.xhr('JSON', 'http://example.org/path?cb=JSON_CALLBACK', null, callback); + browser.xhr('JSONP', 'http://example.org/path?cb=JSON_CALLBACK', null, callback); browser.notifyWhenNoOutstandingRequests(notify); expect(notify).not.toHaveBeenCalled(); -- cgit v1.2.3