@@ -13,21 +13,19 @@ describe('ui.grid.customScrolling', function() {
13
13
off : jasmine . createSpy ( 'off' )
14
14
} ;
15
15
scrollHandler = jasmine . createSpy ( 'scrollHandler' ) ;
16
- gridUtil = jasmine . createSpyObj ( 'gridUtil' , [ 'isTouchEnabled' ] ) ;
17
16
18
- module ( 'ui.grid.customScrolling' , function ( $provide ) {
19
- $provide . value ( 'gridUtil' , gridUtil ) ;
20
- } ) ;
17
+ module ( 'ui.grid.customScrolling' ) ;
21
18
22
- inject ( function ( _uiGridScroller_ , _uiGridScrollerConstants_ ) {
19
+ inject ( function ( _uiGridScroller_ , _uiGridScrollerConstants_ , _gridUtil_ ) {
23
20
uiGridScroller = _uiGridScroller_ ;
24
21
uiGridScrollerConstants = _uiGridScrollerConstants_ ;
22
+ gridUtil = _gridUtil_ ;
25
23
} ) ;
26
24
} ) ;
27
25
28
26
describe ( 'when gridUtils.isTouchEnabled returns true' , function ( ) {
29
27
beforeEach ( function ( ) {
30
- gridUtil . isTouchEnabled . and . returnValue ( true ) ;
28
+ spyOn ( gridUtil , ' isTouchEnabled' ) . and . returnValue ( true ) ;
31
29
uiGridScroller ( element , scrollHandler ) ;
32
30
} ) ;
33
31
it ( 'should initialize uiGridScroller.initiated to NONE' , function ( ) {
@@ -170,7 +168,7 @@ describe('ui.grid.customScrolling', function() {
170
168
171
169
describe ( 'when gridUtils.isTouchEnabled returns false' , function ( ) {
172
170
beforeEach ( function ( ) {
173
- gridUtil . isTouchEnabled . and . returnValue ( false ) ;
171
+ spyOn ( gridUtil , ' isTouchEnabled' ) . and . returnValue ( false ) ;
174
172
uiGridScroller ( element , scrollHandler ) ;
175
173
} ) ;
176
174
it ( 'should initialize uiGridScroller.initiated to NONE' , function ( ) {
0 commit comments