issuable_context_spec review changes

This commit is contained in:
Luke "Jared" Bennett 2017-09-28 13:12:38 +01:00
parent baa08b5657
commit 68269d7a40
No known key found for this signature in database
GPG Key ID: 402ED51FB5D306C2
1 changed files with 5 additions and 5 deletions

View File

@ -5,6 +5,10 @@ describe('IssuableContext', () => {
describe('toggleHiddenParticipants', () => {
const event = jasmine.createSpyObj('event', ['preventDefault']);
afterEach(() => {
gl.lazyLoader = undefined;
});
it('calls loadCheck if lazyLoader is set', () => {
gl.lazyLoader = jasmine.createSpyObj('lazyLoader', ['loadCheck']);
@ -13,16 +17,12 @@ describe('IssuableContext', () => {
expect(gl.lazyLoader.loadCheck).toHaveBeenCalled();
});
it('does not throw if lazyLoader is not set', () => {
it('does not throw if lazyLoader is not defined', () => {
gl.lazyLoader = undefined;
const toggle = IssuableContext.prototype.toggleHiddenParticipants.bind(null, event);
expect(toggle).not.toThrow();
});
afterEach(() => {
gl.lazyLoader = undefined;
});
});
});