Skip to content
This repository was archived by the owner on Jan 24, 2019. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 449d684

Browse files
committedJun 30, 2013
fix(scrollfix): Fixed tests broken in previous commit
1 parent a347ed2 commit 449d684

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed
 

‎modules/scrollfix/test/scrollfixSpec.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,29 @@ describe('uiScrollfix', function () {
1111
}));
1212

1313
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 () {
1515
spyOn($.fn, 'bind');
1616
$compile('<div ui-scrollfix="100"></div>')(scope);
1717
expect($.fn.bind).toHaveBeenCalled();
18-
expect($.fn.bind.mostRecentCall.args[0]).toBe('scroll.ui-scrollfix');
18+
expect($.fn.bind.mostRecentCall.args[0]).toBe('scroll');
1919
});
2020
});
2121
describe('scrolling the window', function () {
2222
it('should add the ui-scrollfix class if the offset is greater than specified', function () {
2323
var element = $compile('<div ui-scrollfix="-100"></div>')(scope);
24-
angular.element($window).trigger('scroll.ui-scrollfix');
24+
angular.element($window).trigger('scroll');
2525
expect(element.hasClass('ui-scrollfix')).toBe(true);
2626
});
2727
it('should remove the ui-scrollfix class if the offset is less than specified (using absolute coord)', function () {
2828
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');
3030
expect(element.hasClass('ui-scrollfix')).toBe(false);
3131

3232
});
3333
it('should remove the ui-scrollfix class if the offset is less than specified (using relative coord)', function () {
3434
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');
3636
expect(element.hasClass('ui-scrollfix')).toBe(false);
3737
});
3838
});
39-
});
39+
});

0 commit comments

Comments
 (0)
This repository has been archived.