diff options
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.js | 14 |
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', () => { |