From 59adadca086853c5de6867ae853f6f27a3af4bbe Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Fri, 5 Aug 2011 01:24:41 +0200 Subject: feat($http): new $http service, removing $xhr.* Features: - aborting requests - more flexible callbacks (per status code) - custom request headers (per request) - access to response headers - custom transform functions (both request, response) - caching - shortcut methods (get, head, post, put, delete, patch, jsonp) - exposing pendingCount() - setting timeout Breaks Renaming $xhr to $http Breaks Takes one parameter now - configuration object Breaks $xhr.cache removed - use configuration cache: true instead Breaks $xhr.error, $xhr.bulk removed Breaks Callback functions get parameters: response, status, headers Closes #38 Closes #80 Closes #180 Closes #299 Closes #342 Closes #395 Closes #413 Closes #414 Closes #507 --- test/directivesSpec.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/directivesSpec.js') diff --git a/test/directivesSpec.js b/test/directivesSpec.js index 5f9fa0a8..ffb6d57c 100644 --- a/test/directivesSpec.js +++ b/test/directivesSpec.js @@ -502,12 +502,12 @@ describe("directive", function() { expect(element.text()).toEqual('hey dude!'); })); - it('should infer injection arguments', inject(function($rootScope, $compile, $xhr) { - temp.MyController = function($xhr){ - this.$root.someService = $xhr; + it('should infer injection arguments', inject(function($rootScope, $compile, $http) { + temp.MyController = function($http) { + this.$root.someService = $http; }; var element = $compile('
')($rootScope); - expect($rootScope.someService).toBe($xhr); + expect($rootScope.someService).toBe($http); })); }); -- cgit v1.2.3