diff options
| author | Misko Hevery | 2011-02-12 10:13:28 -0800 | 
|---|---|---|
| committer | Misko Hevery | 2011-02-16 01:03:12 -0500 | 
| commit | ef4bb28be13e99f96c9ace5936cf26a174a0e5f0 (patch) | |
| tree | 833057505e430cac064214ac3d55c687338da2a9 /test/service | |
| parent | 496e6bf9016d33a7cf2f4730d06a8655f01ca5cb (diff) | |
| download | angular.js-ef4bb28be13e99f96c9ace5936cf26a174a0e5f0.tar.bz2 | |
Change API angular.compile(element)([scope], [element/true])
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});  | 
