diff options
Diffstat (limited to 'test/service')
| -rw-r--r-- | test/service/invalidWidgetsSpec.js | 6 | ||||
| -rw-r--r-- | test/service/routeSpec.js | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/test/service/invalidWidgetsSpec.js b/test/service/invalidWidgetsSpec.js index b6b2da61..4a18dcf8 100644 --- a/test/service/invalidWidgetsSpec.js +++ b/test/service/invalidWidgetsSpec.js @@ -12,9 +12,9 @@ describe('$invalidWidgets', function() { it("should count number of invalid widgets", function(){ - scope = compile('<input name="price" ng:required ng:validate="number"></input>'); - jqLite(document.body).append(scope.$element); - scope.$init(); + var element = jqLite('<input name="price" ng:required ng:validate="number"></input>') + jqLite(document.body).append(element); + scope = compile(element)().scope; var $invalidWidgets = scope.$service('$invalidWidgets'); expect($invalidWidgets.length).toEqual(1); diff --git a/test/service/routeSpec.js b/test/service/routeSpec.js index 95258cc8..4dfa546c 100644 --- a/test/service/routeSpec.js +++ b/test/service/routeSpec.js @@ -18,7 +18,7 @@ describe('$route', function() { function BookChapter() { this.log = '<init>'; } - scope = compile('<div></div>').$init(); + scope = compile('<div></div>')().scope; $location = scope.$service('$location'); $route = scope.$service('$route'); $route.when('/Book/:book/Chapter/:chapter', {controller: BookChapter, template:'Chapter.html'}); @@ -87,7 +87,7 @@ describe('$route', function() { $route = scope.$service('$route'), onChangeSpy = jasmine.createSpy('onChange'); - function NotFoundCtrl() {this.notFoundProp = 'not found!'} + function NotFoundCtrl() {this.notFoundProp = 'not found!';} $route.when('/foo', {template: 'foo.html'}); $route.otherwise({template: '404.html', controller: NotFoundCtrl}); |
