summaryrefslogtreecommitdiff
path: root/spec/frontend/repository
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-25 18:06:04 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-25 18:06:04 +0000
commit801ced25ff0540b096c395f9ac8d2d9e005878e8 (patch)
tree4f3ee19fd0facc1bcda8b93881981ab3315b9658 /spec/frontend/repository
parented9c54b56af280cc552aaac1cfa55533c900c1be (diff)
downloadgitlab-ce-801ced25ff0540b096c395f9ac8d2d9e005878e8.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.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/frontend/repository/utils/dom_spec.js b/spec/frontend/repository/utils/dom_spec.js
index 678d444904d..bf98a9e1a4d 100644
--- a/spec/frontend/repository/utils/dom_spec.js
+++ b/spec/frontend/repository/utils/dom_spec.js
@@ -1,5 +1,5 @@
import { setHTMLFixture } from '../../helpers/fixtures';
-import { updateElementsVisibility } from '~/repository/utils/dom';
+import { updateElementsVisibility, updateFormAction } from '~/repository/utils/dom';
describe('updateElementsVisibility', () => {
it('adds hidden class', () => {
@@ -18,3 +18,13 @@ describe('updateElementsVisibility', () => {
expect(document.querySelector('.js-test').classList).not.toContain('hidden');
});
});
+
+describe('updateFormAction', () => {
+ it('updates form action', () => {
+ setHTMLFixture('<form class="js-test" action="/"></form>');
+
+ updateFormAction('.js-test', '/gitlab/create', '/test');
+
+ expect(document.querySelector('.js-test').action).toBe('http://localhost/gitlab/create/test');
+ });
+});