Commit 06903810 authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett

Add issauble_context_spec

parent 5629d468
import '~/issuable_context';
fdescribe('IssuableContext', () => {
describe('toggleHiddenParticipants', () => {
beforeEach(() => {
});
fit('calls loadCheck if lazyLoader is set', () => {
gl.lazyLoader = jasmine.createSpyObj('lazyLoader', ['loadCheck']);
const event = {};
IssuableContext.prototype.toggleHiddenParticipants(event);
expect(gl.lazyLoader.loadCheck).toHaveBeenCalled();
});
it('does not call loadCheck if lazyLoader is not set', () => {
gl.lazyLoader = undefined;
const event = {};
IssuableContext.prototype.toggleHiddenParticipants(event);
expect(gl.lazyLoader.loadCheck).not.toHaveBeenCalled();
});
afterEach(() => {
gl.lazyLoader = undefined;
});
});
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment