Commit be7ac9ec authored by Phil Hughes's avatar Phil Hughes

Merge branch 'winh-destroy-mr-widget-polling' into 'master'

Cleanup polling of merge request widget in tests

Closes gitlab-ee#7728

See merge request gitlab-org/gitlab-ce!21906
parents cb0f024c f183dba7
...@@ -114,6 +114,8 @@ export default { ...@@ -114,6 +114,8 @@ export default {
}, },
beforeDestroy() { beforeDestroy() {
eventHub.$off('mr.discussion.updated', this.checkStatus); eventHub.$off('mr.discussion.updated', this.checkStatus);
this.pollingInterval.destroy();
this.deploymentsInterval.destroy();
}, },
methods: { methods: {
createService(store) { createService(store) {
......
...@@ -27,6 +27,10 @@ describe('mrWidgetOptions', () => { ...@@ -27,6 +27,10 @@ describe('mrWidgetOptions', () => {
}); });
}); });
afterEach(() => {
vm.$destroy();
});
describe('data', () => { describe('data', () => {
it('should instantiate Store and Service', () => { it('should instantiate Store and Service', () => {
expect(vm.mr).toBeDefined(); expect(vm.mr).toBeDefined();
......
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