title test terms-and-conditions-confirm.spec.js

This commit is contained in:
Ulf Gebhardt 2021-04-25 19:53:29 +02:00
parent 02c3e0a763
commit 427c6f0488
No known key found for this signature in database
GPG Key ID: 81308EFE29ABFEBD

View File

@ -1,7 +1,9 @@
import { config, mount } from '@vue/test-utils'
import TermsAndConditionsConfirm from './terms-and-conditions-confirm.vue'
import VueMeta from 'vue-meta'
const localVue = global.localVue
localVue.use(VueMeta, { keyName: 'head' })
config.stubs['nuxt-link'] = '<span class="nuxt-link"><slot /></span>'
@ -11,7 +13,7 @@ describe('terms-and-conditions-confirm.vue', () => {
beforeEach(() => {
mocks = {
$t: jest.fn(),
$t: (t) => t,
}
})
@ -30,5 +32,9 @@ describe('terms-and-conditions-confirm.vue', () => {
it('renders', () => {
expect(wrapper.is('div')).toBe(true)
})
it('has correct <head> content', () => {
expect(wrapper.vm.$metaInfo.title).toBe('termsAndConditions.newTermsAndConditions')
})
})
})