aboutsummaryrefslogtreecommitdiffstats
path: root/test/directivesSpec.js
diff options
context:
space:
mode:
authorVojta Jina2011-08-05 01:24:41 +0200
committerIgor Minar2011-11-30 11:12:14 -0500
commit59adadca086853c5de6867ae853f6f27a3af4bbe (patch)
treef56e4501975a7e53475f6e0d7bb606e530983a7b /test/directivesSpec.js
parent497839f583ca3dd75583fb996bb764cbd6d7c4ac (diff)
downloadangular.js-59adadca086853c5de6867ae853f6f27a3af4bbe.tar.bz2
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
Diffstat (limited to 'test/directivesSpec.js')
-rw-r--r--test/directivesSpec.js8
1 files changed, 4 insertions, 4 deletions
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('<div ng:controller="temp.MyController"></div>')($rootScope);
- expect($rootScope.someService).toBe($xhr);
+ expect($rootScope.someService).toBe($http);
}));
});