From b5a3004e2fae3637dab9efbe2f6540e4101e50a2 Mon Sep 17 00:00:00 2001 From: mfluharty Date: Wed, 6 Mar 2019 14:28:36 -0700 Subject: [PATCH] Add fields displayed in modal to test --- spec/javascripts/pipelines/pipelines_table_row_spec.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/javascripts/pipelines/pipelines_table_row_spec.js b/spec/javascripts/pipelines/pipelines_table_row_spec.js index 223703b60c1..234fc705a81 100644 --- a/spec/javascripts/pipelines/pipelines_table_row_spec.js +++ b/spec/javascripts/pipelines/pipelines_table_row_spec.js @@ -195,8 +195,10 @@ describe('Pipelines Table Row', () => { it('emits `openConfirmationModal` event when cancel button is clicked and toggles loading', () => { eventHub.$once('openConfirmationModal', data => { + const { id, ref, commit } = pipeline; + expect(data.endpoint).toEqual('/cancel'); - expect(data.pipeline.id).toEqual(pipeline.id); + expect(data.pipeline).toEqual(jasmine.objectContaining({ id, ref, commit })); }); component.$el.querySelector('.js-pipelines-cancel-button').click();