@@ -7,12 +7,13 @@ describe("ngAnimate", function() {
7
7
var ss , body ;
8
8
beforeEach ( module ( function ( ) {
9
9
body = jqLite ( document . body ) ;
10
- return function ( $window , $document , $animate , $timeout ) {
10
+ return function ( $window , $document , $animate , $timeout , $rootScope ) {
11
11
ss = createMockStyleSheet ( $document , $window ) ;
12
12
try {
13
13
$timeout . flush ( ) ;
14
14
} catch ( e ) { }
15
15
$animate . enabled ( true ) ;
16
+ $rootScope . $digest ( ) ;
16
17
} ;
17
18
} ) ) ;
18
19
@@ -36,17 +37,7 @@ describe("ngAnimate", function() {
36
37
37
38
describe ( "enable / disable" , function ( ) {
38
39
39
- it ( "should work for all animations" , function ( ) {
40
- var $animate , initialState = null ;
41
-
42
- angular . bootstrap ( body , [ 'ngAnimate' , function ( ) {
43
- return function ( _$animate_ ) {
44
- $animate = _$animate_ ;
45
- initialState = $animate . enabled ( ) ;
46
- }
47
- } ] ) ;
48
-
49
- expect ( initialState ) . toBe ( false ) ;
40
+ it ( "should work for all animations" , inject ( function ( $animate ) {
50
41
51
42
expect ( $animate . enabled ( ) ) . toBe ( true ) ;
52
43
@@ -55,7 +46,7 @@ describe("ngAnimate", function() {
55
46
56
47
expect ( $animate . enabled ( 1 ) ) . toBe ( true ) ;
57
48
expect ( $animate . enabled ( ) ) . toBe ( true ) ;
58
- } ) ;
49
+ } ) ) ;
59
50
60
51
it ( 'should place a hard disable on all child animations' , function ( ) {
61
52
var count = 0 ;
0 commit comments