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
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/vue_mr_widget/mr_widget_options_spec.js')
-rw-r--r--spec/frontend/vue_mr_widget/mr_widget_options_spec.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/frontend/vue_mr_widget/mr_widget_options_spec.js b/spec/frontend/vue_mr_widget/mr_widget_options_spec.js
index d6f85dcfcc7..cb0006548d4 100644
--- a/spec/frontend/vue_mr_widget/mr_widget_options_spec.js
+++ b/spec/frontend/vue_mr_widget/mr_widget_options_spec.js
@@ -260,6 +260,20 @@ describe('mrWidgetOptions', () => {
});
});
});
+
+ describe('formattedHumanAccess', () => {
+ it('when user is a tool admin but not a member of project', () => {
+ vm.mr.humanAccess = null;
+
+ expect(vm.formattedHumanAccess).toEqual('');
+ });
+
+ it('when user a member of the project', () => {
+ vm.mr.humanAccess = 'Owner';
+
+ expect(vm.formattedHumanAccess).toEqual('owner');
+ });
+ });
});
describe('methods', () => {