diff options
author | Clement Ho <clemmakesapps@gmail.com> | 2018-10-15 19:27:21 +0300 |
---|---|---|
committer | Clement Ho <clemmakesapps@gmail.com> | 2018-10-15 19:27:21 +0300 |
commit | bf47fc8b0c05bf57e18e985e2ad2569c625108b3 (patch) | |
tree | 49feb25f0eebfebcbec5fcd6276d2d4ca296adb2 /spec | |
parent | b8e3a3de6f788658363503da89f40e0f2eff2c9d (diff) | |
parent | 2bbd16e840f4ab2fed9f0166e67a1e77628defb8 (diff) |
Merge branch '52532-unable-to-toggle-issuable-sidebar-out-of-collapsed-state' into 'master'
Allow Issue and Merge Request sidebar to be toggled from collapsed state
Closes #52532
See merge request gitlab-org/gitlab-ce!22353
Diffstat (limited to 'spec')
-rw-r--r-- | spec/javascripts/right_sidebar_spec.js | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/spec/javascripts/right_sidebar_spec.js b/spec/javascripts/right_sidebar_spec.js index 936e8f16c52..43e4db4c712 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, no-return-assign, vars-on-top, jasmine/no-unsafe-spy */ +/* eslint-disable no-var, one-var, no-return-assign, vars-on-top */ import $ from 'jquery'; import MockAdapter from 'axios-mock-adapter'; @@ -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); |