@@ -11,29 +11,29 @@ describe('uiScrollfix', function () {
11
11
} ) ) ;
12
12
13
13
describe ( 'compiling this directive' , function ( ) {
14
- it ( 'should bind to window "scroll" event with a ui-scrollfix namespace ' , function ( ) {
14
+ it ( 'should bind to window "scroll" event' , function ( ) {
15
15
spyOn ( $ . fn , 'bind' ) ;
16
16
$compile ( '<div ui-scrollfix="100"></div>' ) ( scope ) ;
17
17
expect ( $ . fn . bind ) . toHaveBeenCalled ( ) ;
18
- expect ( $ . fn . bind . mostRecentCall . args [ 0 ] ) . toBe ( 'scroll.ui-scrollfix ' ) ;
18
+ expect ( $ . fn . bind . mostRecentCall . args [ 0 ] ) . toBe ( 'scroll' ) ;
19
19
} ) ;
20
20
} ) ;
21
21
describe ( 'scrolling the window' , function ( ) {
22
22
it ( 'should add the ui-scrollfix class if the offset is greater than specified' , function ( ) {
23
23
var element = $compile ( '<div ui-scrollfix="-100"></div>' ) ( scope ) ;
24
- angular . element ( $window ) . trigger ( 'scroll.ui-scrollfix ' ) ;
24
+ angular . element ( $window ) . trigger ( 'scroll' ) ;
25
25
expect ( element . hasClass ( 'ui-scrollfix' ) ) . toBe ( true ) ;
26
26
} ) ;
27
27
it ( 'should remove the ui-scrollfix class if the offset is less than specified (using absolute coord)' , function ( ) {
28
28
var element = $compile ( '<div ui-scrollfix="100" class="ui-scrollfix"></div>' ) ( scope ) ;
29
- angular . element ( $window ) . trigger ( 'scroll.ui-scrollfix ' ) ;
29
+ angular . element ( $window ) . trigger ( 'scroll' ) ;
30
30
expect ( element . hasClass ( 'ui-scrollfix' ) ) . toBe ( false ) ;
31
31
32
32
} ) ;
33
33
it ( 'should remove the ui-scrollfix class if the offset is less than specified (using relative coord)' , function ( ) {
34
34
var element = $compile ( '<div ui-scrollfix="+100" class="ui-scrollfix"></div>' ) ( scope ) ;
35
- angular . element ( $window ) . trigger ( 'scroll.ui-scrollfix ' ) ;
35
+ angular . element ( $window ) . trigger ( 'scroll' ) ;
36
36
expect ( element . hasClass ( 'ui-scrollfix' ) ) . toBe ( false ) ;
37
37
} ) ;
38
38
} ) ;
39
- } ) ;
39
+ } ) ;
0 commit comments