summaryrefslogtreecommitdiff
path: root/spec/javascripts/right_sidebar_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/javascripts/right_sidebar_spec.js')
-rw-r--r--spec/javascripts/right_sidebar_spec.js30
1 files changed, 1 insertions, 29 deletions
diff --git a/spec/javascripts/right_sidebar_spec.js b/spec/javascripts/right_sidebar_spec.js
index c7190ea9960..911ca19a3df 100644
--- a/spec/javascripts/right_sidebar_spec.js
+++ b/spec/javascripts/right_sidebar_spec.js
@@ -1,4 +1,4 @@
-/* eslint-disable no-var, one-var, one-var-declaration-per-line, no-return-assign, vars-on-top, jasmine/no-unsafe-spy, max-len */
+/* eslint-disable no-var, one-var, one-var-declaration-per-line, no-return-assign, vars-on-top, max-len */
import $ from 'jquery';
import MockAdapter from 'axios-mock-adapter';
@@ -92,33 +92,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);