mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
coverage privacy.spec.js
This commit is contained in:
parent
e5ff917d8d
commit
e6de7b1de8
42
webapp/pages/settings/privacy.spec.js
Normal file
42
webapp/pages/settings/privacy.spec.js
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
import Vuex from 'vuex'
|
||||||
|
import { mount } from '@vue/test-utils'
|
||||||
|
import Privacy from './privacy.vue'
|
||||||
|
|
||||||
|
const localVue = global.localVue
|
||||||
|
|
||||||
|
describe('privacy.vue', () => {
|
||||||
|
let wrapper
|
||||||
|
let mocks
|
||||||
|
let store
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
mocks = {
|
||||||
|
$t: jest.fn(),
|
||||||
|
}
|
||||||
|
store = new Vuex.Store({
|
||||||
|
getters: {
|
||||||
|
'auth/user': () => {
|
||||||
|
return { id: 'u343', name: 'Delete MyAccount', showShoutsPublicly: true }
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('mount', () => {
|
||||||
|
const Wrapper = () => {
|
||||||
|
return mount(Privacy, {
|
||||||
|
store,
|
||||||
|
mocks,
|
||||||
|
localVue,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
wrapper = Wrapper()
|
||||||
|
})
|
||||||
|
|
||||||
|
it('renders', () => {
|
||||||
|
expect(wrapper.is('.base-card')).toBe(true)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
Loading…
x
Reference in New Issue
Block a user