Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorBryce Johnson <bryce@gitlab.com>2017-06-20 23:55:06 +0300
committerBryce Johnson <bryce@gitlab.com>2017-06-21 00:55:28 +0300
commit71037ab1d3be38489677f691ec5811bd3f49f1cd (patch)
tree7c31494172fa44c3e5af8487e6c24e448ae65ae0 /spec
parentb2e1d32e7a74b22b23e8ab052bd29e15bb8a4f1e (diff)
Fix stateMaps production error re: related links in MR widget.
!12318
Diffstat (limited to 'spec')
-rw-r--r--spec/javascripts/vue_mr_widget/mr_widget_options_spec.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/javascripts/vue_mr_widget/mr_widget_options_spec.js b/spec/javascripts/vue_mr_widget/mr_widget_options_spec.js
index 425dff89439..a1b3ad3d99a 100644
--- a/spec/javascripts/vue_mr_widget/mr_widget_options_spec.js
+++ b/spec/javascripts/vue_mr_widget/mr_widget_options_spec.js
@@ -86,10 +86,17 @@ describe('mrWidgetOptions', () => {
expect(vm.shouldRenderRelatedLinks).toBeFalsy();
});
- it('should return true if there is relatedLinks in MR', () => {
+ it('should return true if there is relatedLinks in MR and it is not merged', () => {
vm.mr.relatedLinks = {};
+ vm.mr.isMerged = false;
expect(vm.shouldRenderRelatedLinks).toBeTruthy();
});
+
+ it('should return false if isMerged is true', () => {
+ vm.mr.relatedLinks = {};
+ vm.mr.isMerged = true;
+ expect(vm.shouldRenderRelatedLinks).toBeFalsy();
+ });
});
describe('shouldRenderDeployments', () => {