summaryrefslogtreecommitdiff
path: root/spec/frontend/issuable/related_issues/components/related_issues_root_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/issuable/related_issues/components/related_issues_root_spec.js')
-rw-r--r--spec/frontend/issuable/related_issues/components/related_issues_root_spec.js27
1 files changed, 19 insertions, 8 deletions
diff --git a/spec/frontend/issuable/related_issues/components/related_issues_root_spec.js b/spec/frontend/issuable/related_issues/components/related_issues_root_spec.js
index b59717a1f60..1a03ea58b60 100644
--- a/spec/frontend/issuable/related_issues/components/related_issues_root_spec.js
+++ b/spec/frontend/issuable/related_issues/components/related_issues_root_spec.js
@@ -300,16 +300,27 @@ describe('RelatedIssuesRoot', () => {
expect(wrapper.vm.state.pendingReferences[1]).toEqual('random');
});
- it('prepends # when user enters a numeric value [0-9]', async () => {
- const input = '23';
+ it.each`
+ pathIdSeparator
+ ${'#'}
+ ${'&'}
+ `(
+ 'prepends $pathIdSeparator when user enters a numeric value [0-9]',
+ async ({ pathIdSeparator }) => {
+ const input = '23';
+
+ await wrapper.setProps({
+ pathIdSeparator,
+ });
- wrapper.vm.onInput({
- untouchedRawReferences: input.trim().split(/\s/),
- touchedReference: input,
- });
+ wrapper.vm.onInput({
+ untouchedRawReferences: input.trim().split(/\s/),
+ touchedReference: input,
+ });
- expect(wrapper.vm.inputValue).toBe(`#${input}`);
- });
+ expect(wrapper.vm.inputValue).toBe(`${pathIdSeparator}${input}`);
+ },
+ );
it('prepends # when user enters a number', async () => {
const input = 23;