summaryrefslogtreecommitdiff
path: root/spec/frontend/sidebar/components/assignees/sidebar_assignees_widget_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/sidebar/components/assignees/sidebar_assignees_widget_spec.js')
-rw-r--r--spec/frontend/sidebar/components/assignees/sidebar_assignees_widget_spec.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/frontend/sidebar/components/assignees/sidebar_assignees_widget_spec.js b/spec/frontend/sidebar/components/assignees/sidebar_assignees_widget_spec.js
index 88015ed42a3..3644a51c7fd 100644
--- a/spec/frontend/sidebar/components/assignees/sidebar_assignees_widget_spec.js
+++ b/spec/frontend/sidebar/components/assignees/sidebar_assignees_widget_spec.js
@@ -65,6 +65,7 @@ describe('Sidebar assignees widget', () => {
issuableId: 0,
fullPath: '/mygroup/myProject',
allowMultipleAssignees: true,
+ editable: true,
...props,
},
provide: {
@@ -350,6 +351,17 @@ describe('Sidebar assignees widget', () => {
});
});
+ describe('when issuable is not editable by the user', () => {
+ beforeEach(async () => {
+ createComponent({ props: { editable: false } });
+ await waitForPromises();
+ });
+
+ it('passes editable prop as false to IssuableAssignees', () => {
+ expect(findAssignees().props('editable')).toBe(false);
+ });
+ });
+
it('includes the real-time assignees component', async () => {
createComponent();
await waitForPromises();