Skip to content
Snippets Groups Projects
Commit 4e732dec authored by Simon Knox's avatar Simon Knox
Browse files

Prevent MR Widget error when no CI configured

parent 498ade48
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -152,6 +152,7 @@ export default {
},
handleNotification(data) {
if (data.ci_status === this.mr.ciStatus) return;
if (!data.pipeline) return;
 
const label = data.pipeline.details.status.label;
const title = `Pipeline ${label}`;
Loading
Loading
---
title: Prevent MR Widget error when no CI configured
merge_request:
author:
type: fixed
Loading
Loading
@@ -295,6 +295,15 @@ describe('mrWidgetOptions', () => {
 
expect(notify.notifyMe).not.toHaveBeenCalled();
});
it('should not notify if no pipeline provided', () => {
vm.handleNotification({
...data,
pipeline: undefined,
});
expect(notify.notifyMe).not.toHaveBeenCalled();
});
});
 
describe('resumePolling', () => {
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment