diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-05-23 22:15:59 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-05-23 22:15:59 +0000 |
commit | 34a6d80e1146b2e88a95f91c2bd84214f130d4c5 (patch) | |
tree | 001142c0a4b1033329573a253ac9958c324ebd9e /spec | |
parent | a9c1925dbf6cfde9f94cf528decd17aec7d1f2ee (diff) | |
parent | 468f91686c065fe99b1eb744bb4d4645181341c8 (diff) | |
download | gitlab-ce-34a6d80e1146b2e88a95f91c2bd84214f130d4c5.tar.gz |
Merge branch 'acet-fix-mr-widget-state' into 'master'
Change order of if blocks to determine widget state properly.
Closes #32550
See merge request !11668
Diffstat (limited to 'spec')
-rw-r--r-- | spec/javascripts/vue_mr_widget/stores/get_state_key_spec.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/javascripts/vue_mr_widget/stores/get_state_key_spec.js b/spec/javascripts/vue_mr_widget/stores/get_state_key_spec.js index 9a331d99865..179e42a7cc4 100644 --- a/spec/javascripts/vue_mr_widget/stores/get_state_key_spec.js +++ b/spec/javascripts/vue_mr_widget/stores/get_state_key_spec.js @@ -25,6 +25,12 @@ describe('getStateKey', () => { context.canBeMerged = true; expect(bound()).toEqual('readyToMerge'); + context.canMerge = false; + expect(bound()).toEqual('notAllowedToMerge'); + + context.mergeWhenPipelineSucceeds = true; + expect(bound()).toEqual('mergeWhenPipelineSucceeds'); + context.hasSHAChanged = true; expect(bound()).toEqual('shaMismatch'); @@ -38,12 +44,6 @@ describe('getStateKey', () => { context.isPipelineFailed = true; expect(bound()).toEqual('pipelineFailed'); - context.canMerge = false; - expect(bound()).toEqual('notAllowedToMerge'); - - context.mergeWhenPipelineSucceeds = true; - expect(bound()).toEqual('mergeWhenPipelineSucceeds'); - data.work_in_progress = true; expect(bound()).toEqual('workInProgress'); |