diff options
Diffstat (limited to 'test/widgetsSpec.js')
| -rw-r--r-- | test/widgetsSpec.js | 16 | 
1 files changed, 5 insertions, 11 deletions
diff --git a/test/widgetsSpec.js b/test/widgetsSpec.js index 90555325..adbdf94e 100644 --- a/test/widgetsSpec.js +++ b/test/widgetsSpec.js @@ -429,56 +429,50 @@ describe("widget", function() {      it('should load content via xhr when route changes', function() { -      $route.when('/foo', {controller: angular.noop, template: 'myUrl1'}); -      $route.when('/bar', {controller: angular.noop, template: 'myUrl2'}); +      $route.when('/foo', {template: 'myUrl1'}); +      $route.when('/bar', {template: 'myUrl2'});        expect(rootScope.$element.text()).toEqual('');        $location.path('/foo');        $browser.xhr.expectGET('myUrl1').respond('<div>{{1+3}}</div>');        rootScope.$digest(); -      rootScope.$digest();        $browser.xhr.flush();        expect(rootScope.$element.text()).toEqual('4');        $location.path('/bar');        $browser.xhr.expectGET('myUrl2').respond('angular is da best');        rootScope.$digest(); -      rootScope.$digest();        $browser.xhr.flush();        expect(rootScope.$element.text()).toEqual('angular is da best');      });      it('should remove all content when location changes to an unknown route', function() { -      $route.when('/foo', {controller: angular.noop, template: 'myUrl1'}); +      $route.when('/foo', {template: 'myUrl1'});        $location.path('/foo');        $browser.xhr.expectGET('myUrl1').respond('<div>{{1+3}}</div>');        rootScope.$digest(); -      rootScope.$digest();        $browser.xhr.flush();        expect(rootScope.$element.text()).toEqual('4');        $location.path('/unknown');        rootScope.$digest(); -      rootScope.$digest();        expect(rootScope.$element.text()).toEqual('');      });      it('should chain scopes and propagate evals to the child scope', function() { -      $route.when('/foo', {controller: angular.noop, template: 'myUrl1'}); +      $route.when('/foo', {template: 'myUrl1'});        rootScope.parentVar = 'parent';        $location.path('/foo');        $browser.xhr.expectGET('myUrl1').respond('<div>{{parentVar}}</div>');        rootScope.$digest(); -      rootScope.$digest();        $browser.xhr.flush();        expect(rootScope.$element.text()).toEqual('parent');        rootScope.parentVar = 'new parent';        rootScope.$digest(); -      rootScope.$digest();        expect(rootScope.$element.text()).toEqual('new parent');      }); @@ -510,7 +504,7 @@ describe("widget", function() {      it('should initialize view template after the view controller was initialized even when ' +         'templates were cached', function() { -      //this is a test for a regression that was introduced by making the ng:view cache sync +      // this is a test for a regression that was introduced by making the ng:view cache sync        $route.when('/foo', {controller: ParentCtrl, template: 'viewPartial.html'});  | 
