summaryrefslogtreecommitdiff
path: root/spec/frontend/repository
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-10 15:08:54 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-10 15:08:54 +0000
commit11e5d1b9ca3efa7be34ddebb708a6aedb4e91639 (patch)
tree999fdffb9d3db2e5200994e289e50fa3a3a1684a /spec/frontend/repository
parent7351a484d79236b7e9d47c86f2fcc970b7ae10b0 (diff)
downloadgitlab-ce-11e5d1b9ca3efa7be34ddebb708a6aedb4e91639.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/repository')
-rw-r--r--spec/frontend/repository/utils/dom_spec.js13
1 files changed, 10 insertions, 3 deletions
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('<form class="js-test" action="/"></form>');
- 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(/^\//, '')}`,
+ );
});
});