diff options
| author | Misko Hevery | 2011-11-01 21:09:54 -0700 |
|---|---|---|
| committer | Misko Hevery | 2011-11-14 16:39:32 -0800 |
| commit | ed36b9da3be338fe9eb36f3eeea901d6f51cd768 (patch) | |
| tree | ffdc924e4b1fc1c6912674c82e029bf975ca9fca /test/service/xhr.cacheSpec.js | |
| parent | c925f8a6578e05c8136c206f2fd98eeaaf1c0f16 (diff) | |
| download | angular.js-ed36b9da3be338fe9eb36f3eeea901d6f51cd768.tar.bz2 | |
refactor(injector): switch to injector 2.0 introduce modules
Diffstat (limited to 'test/service/xhr.cacheSpec.js')
| -rw-r--r-- | test/service/xhr.cacheSpec.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/test/service/xhr.cacheSpec.js b/test/service/xhr.cacheSpec.js index 328dfe3a..b6eeb6aa 100644 --- a/test/service/xhr.cacheSpec.js +++ b/test/service/xhr.cacheSpec.js @@ -3,13 +3,11 @@ describe('$xhr.cache', function() { var log; - beforeEach(inject(function(service) { - service('$xhr.error', function(){ - return jasmine.createSpy('$xhr.error'); - }); - service.alias('$xhr.cache', '$xhrCache'); - service.alias('$xhr.bulk', '$xhrBulk'); - service.alias('$xhr.error', '$xhrError'); + beforeEach(inject(function($provide) { + $provide.value('$xhr.error', jasmine.createSpy('$xhr.error')); + $provide.factory('$xhrError', ['$xhr.error', identity]); + $provide.factory('$xhrBulk', ['$xhr.bulk', identity]); + $provide.factory('$xhrCache', ['$xhr.cache', identity]); log = ''; })); |
