diff --git a/admin/src/components/ConfirmRegisterMailFormular.spec.js b/admin/src/components/ConfirmRegisterMailFormular.spec.js new file mode 100644 index 000000000..a53fcae02 --- /dev/null +++ b/admin/src/components/ConfirmRegisterMailFormular.spec.js @@ -0,0 +1,40 @@ +import { mount } from '@vue/test-utils' +import ConfirmRegisterMailFormular from './ConfirmRegisterMailFormular.vue' + +const localVue = global.localVue + +const mocks = { + $moment: jest.fn(() => { + return { + format: jest.fn((m) => m), + subtract: jest.fn(() => { + return { + format: jest.fn((m) => m), + } + }), + } + }), +} + +const propsData = { + email: '', + dateLastSend: '', +} + +describe('ConfirmRegisterMailFormular', () => { + let wrapper + + const Wrapper = () => { + return mount(ConfirmRegisterMailFormular, { localVue, mocks, propsData }) + } + + describe('mount', () => { + beforeEach(() => { + wrapper = Wrapper() + }) + + it('has a DIV element with the class.component-confirm-register-mail', () => { + expect(wrapper.find('.component-confirm-register-mail').exists()).toBeTruthy() + }) + }) +}) diff --git a/admin/src/components/ConfirmRegisterMailFormular.vue b/admin/src/components/ConfirmRegisterMailFormular.vue index 494ab7b27..5ccf2eb15 100644 --- a/admin/src/components/ConfirmRegisterMailFormular.vue +++ b/admin/src/components/ConfirmRegisterMailFormular.vue @@ -11,7 +11,7 @@ - + Registrierungs-Email bestätigen, jetzt senden @@ -32,15 +32,10 @@ export default { type: String, }, }, - data() { - return {} - }, - methods: { sendRegisterMail() { - alert( - 'sende wiederholt den ConfirmText an die register E-Mail (' + this.email + ') des User!', - ) + // eslint-disable-next-line no-console + console.log('sende wiederholt den ConfirmText an die register E-Mail des User!') }, }, }