From 11e5d1b9ca3efa7be34ddebb708a6aedb4e91639 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 10 Feb 2020 15:08:54 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/frontend/repository/utils/dom_spec.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'spec/frontend/repository') diff --git a/spec/frontend/repository/utils/dom_spec.js b/spec/frontend/repository/utils/dom_spec.js index bf98a9e1a4d..0b61161c9d0 100644 --- a/spec/frontend/repository/utils/dom_spec.js +++ b/spec/frontend/repository/utils/dom_spec.js @@ -20,11 +20,18 @@ describe('updateElementsVisibility', () => { }); describe('updateFormAction', () => { - it('updates form action', () => { + it.each` + path + ${'/test'} + ${'test'} + ${'/'} + `('updates form action for $path', ({ path }) => { setHTMLFixture('
'); - updateFormAction('.js-test', '/gitlab/create', '/test'); + updateFormAction('.js-test', '/gitlab/create', path); - expect(document.querySelector('.js-test').action).toBe('http://localhost/gitlab/create/test'); + expect(document.querySelector('.js-test').action).toBe( + `http://localhost/gitlab/create/${path.replace(/^\//, '')}`, + ); }); }); -- cgit v1.2.3