diff options
author | Lukas Eipert <leipert@gitlab.com> | 2018-10-15 08:55:41 +0300 |
---|---|---|
committer | Lukas Eipert <leipert@gitlab.com> | 2018-10-15 09:05:45 +0300 |
commit | 05ec7b352fe777426a12a5962bb9c06b86d62961 (patch) | |
tree | 0e4166cac939d07e1211c7cc91774c4ca25449c2 /spec/javascripts/right_sidebar_spec.js | |
parent | 75b6ed8d2d0591efa19b02173c0524551e95f691 (diff) |
Remove obsolete usage of gl.lazyLoader.loadCheck
In [!21565][0] we removed the loadCheck function from the LazyLoader for
images. The function seemed to be obsolete before anyhow, because we
make use of the MutationObserver in order to detect elements added /
removed from the DOM.
[0]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21565
Diffstat (limited to 'spec/javascripts/right_sidebar_spec.js')
-rw-r--r-- | spec/javascripts/right_sidebar_spec.js | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/spec/javascripts/right_sidebar_spec.js b/spec/javascripts/right_sidebar_spec.js index 936e8f16c52..5a6cc5579bd 100644 --- a/spec/javascripts/right_sidebar_spec.js +++ b/spec/javascripts/right_sidebar_spec.js @@ -94,33 +94,5 @@ import Sidebar from '~/right_sidebar'; }); }); }); - - describe('sidebarToggleClicked', () => { - const event = jasmine.createSpyObj('event', ['preventDefault']); - - beforeEach(() => { - spyOn($.fn, 'hasClass').and.returnValue(false); - }); - - afterEach(() => { - gl.lazyLoader = undefined; - }); - - it('calls loadCheck if lazyLoader is set', () => { - gl.lazyLoader = jasmine.createSpyObj('lazyLoader', ['loadCheck']); - - Sidebar.prototype.sidebarToggleClicked(event); - - expect(gl.lazyLoader.loadCheck).toHaveBeenCalled(); - }); - - it('does not throw if lazyLoader is not defined', () => { - gl.lazyLoader = undefined; - - const toggle = Sidebar.prototype.sidebarToggleClicked.bind(null, event); - - expect(toggle).not.toThrow(); - }); - }); }); }).call(window); |