summaryrefslogtreecommitdiff
path: root/spec/frontend/vue_shared/components/recaptcha_modal_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/vue_shared/components/recaptcha_modal_spec.js')
-rw-r--r--spec/frontend/vue_shared/components/recaptcha_modal_spec.js35
1 files changed, 0 insertions, 35 deletions
diff --git a/spec/frontend/vue_shared/components/recaptcha_modal_spec.js b/spec/frontend/vue_shared/components/recaptcha_modal_spec.js
deleted file mode 100644
index 8ab65efd388..00000000000
--- a/spec/frontend/vue_shared/components/recaptcha_modal_spec.js
+++ /dev/null
@@ -1,35 +0,0 @@
-import { shallowMount } from '@vue/test-utils';
-
-import { eventHub } from '~/vue_shared/components/recaptcha_eventhub';
-
-import RecaptchaModal from '~/vue_shared/components/recaptcha_modal.vue';
-
-describe('RecaptchaModal', () => {
- const recaptchaFormId = 'recaptcha-form';
- const recaptchaHtml = `<form id="${recaptchaFormId}"></form>`;
-
- let wrapper;
-
- const findRecaptchaForm = () => wrapper.find(`#${recaptchaFormId}`).element;
-
- beforeEach(() => {
- wrapper = shallowMount(RecaptchaModal, {
- propsData: {
- html: recaptchaHtml,
- },
- });
- });
-
- afterEach(() => {
- wrapper.destroy();
- });
-
- it('submits the form if event hub emits submit event', () => {
- const form = findRecaptchaForm();
- jest.spyOn(form, 'submit').mockImplementation();
-
- eventHub.$emit('submit');
-
- expect(form.submit).toHaveBeenCalled();
- });
-});