diff options
| author | Matias Niemelàˆ | 2013-08-01 22:17:10 -0400 | 
|---|---|---|
| committer | Misko Hevery | 2013-08-03 00:46:17 -0700 | 
| commit | 6e8bd786ba853613472f3864e48048a425c46823 (patch) | |
| tree | f341aea0ca016d63f657ce64fda72cd9f6339d33 /test | |
| parent | 4ed5fc90b984bb704da8cb66dffab43cf78abefa (diff) | |
| download | angular.js-6e8bd786ba853613472f3864e48048a425c46823.tar.bz2 | |
fix(ngAnimate): remove compound JS selector animations
Diffstat (limited to 'test')
| -rw-r--r-- | test/ng/animateSpec.js | 17 | 
1 files changed, 14 insertions, 3 deletions
| diff --git a/test/ng/animateSpec.js b/test/ng/animateSpec.js index c5914a74..2e9034e4 100644 --- a/test/ng/animateSpec.js +++ b/test/ng/animateSpec.js @@ -1,9 +1,11 @@  describe("$animate", function() {    describe("without animation", function() { -    beforeEach(inject(function($compile, _$rootElement_, $rootScope) { -      element = $compile('<div></div>')($rootScope); -      $rootElement = _$rootElement_; +    beforeEach(module(function() { +      return function($compile, _$rootElement_, $rootScope) { +        element = $compile('<div></div>')($rootScope); +        $rootElement = _$rootElement_; +      };      }));      it("should add element at the start of enter animation", inject(function($animate, $compile, $rootScope) { @@ -37,5 +39,14 @@ describe("$animate", function() {        $animate.addClass(element, 'ng-hide');        expect(element).toBeHidden();      })); + +    it("should throw error on wrong selector", function() { +      module(function($animateProvider) { +        expect(function() { +          $animateProvider.register('abc', null); +        }).toThrow("[$animate:notcsel] Expecting class selector starting with '.' got 'abc'."); +      }); +      inject(); +    });    });  }); | 
