aboutsummaryrefslogtreecommitdiffstats
path: root/test/ResourceSpec.js
diff options
context:
space:
mode:
authorMisko Hevery2011-10-25 22:21:21 -0700
committerMisko Hevery2011-11-14 16:39:32 -0800
commitd12df0d360fe0dabdca3591654327834bee2803b (patch)
tree605694ecc056869e9dd20283d8256c92655a44d4 /test/ResourceSpec.js
parentd9b58f23f6b3fe5635c3ec5259e6a0002cff78b7 (diff)
downloadangular.js-d12df0d360fe0dabdca3591654327834bee2803b.tar.bz2
refactor(compiler) turn compiler into a service
BREAK - remove angular.compile() since the compile method is now a service and needs to be injected
Diffstat (limited to 'test/ResourceSpec.js')
-rw-r--r--test/ResourceSpec.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/ResourceSpec.js b/test/ResourceSpec.js
index 75d81a89..928b4f6c 100644
--- a/test/ResourceSpec.js
+++ b/test/ResourceSpec.js
@@ -221,8 +221,8 @@ describe("resource", function() {
nakedExpect(visa).toEqual({id:123});
}));
- it('should excersize full stack', inject(function($rootScope, $browser, $resource) {
- angular.compile('<div></div>')($rootScope);
+ it('should excersize full stack', inject(function($rootScope, $browser, $resource, $compile) {
+ $compile('<div></div>')($rootScope);
var Person = $resource('/Person/:id');
$browser.xhr.expectGET('/Person/123').respond('\n{\n"name":\n"misko"\n}\n');
var person = Person.get({id:123});
@@ -230,8 +230,8 @@ describe("resource", function() {
expect(person.name).toEqual('misko');
}));
- it('should return the same object when verifying the cache', inject(function($rootScope) {
- angular.compile('<div></div>')($rootScope);
+ it('should return the same object when verifying the cache', inject(function($rootScope, $compile) {
+ $compile('<div></div>')($rootScope);
var $browser = $rootScope.$service('$browser');
var $resource = $rootScope.$service('$resource');
var Person = $resource('/Person/:id', null, {query: {method:'GET', isArray: true, verifyCache: true}});