diff options
Diffstat (limited to 'spec/frontend/ide/stores')
-rw-r--r-- | spec/frontend/ide/stores/modules/pipelines/actions_spec.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/frontend/ide/stores/modules/pipelines/actions_spec.js b/spec/frontend/ide/stores/modules/pipelines/actions_spec.js index 9aa31136c89..3ede37e2eed 100644 --- a/spec/frontend/ide/stores/modules/pipelines/actions_spec.js +++ b/spec/frontend/ide/stores/modules/pipelines/actions_spec.js @@ -188,6 +188,24 @@ describe('IDE pipelines actions', () => { .catch(done.fail); }); }); + + it('sets latest pipeline to `null` and stops polling on empty project', (done) => { + mockedState = { + ...mockedState, + rootGetters: { + lastCommit: null, + }, + }; + + testAction( + fetchLatestPipeline, + {}, + mockedState, + [{ type: types.RECEIVE_LASTEST_PIPELINE_SUCCESS, payload: null }], + [{ type: 'stopPipelinePolling' }], + done, + ); + }); }); describe('requestJobs', () => { |