mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2026-01-20 11:51:22 +00:00
fix some tests
This commit is contained in:
parent
bd8d3e9259
commit
0ce245b252
@ -51,13 +51,17 @@ describe('PostTeaser', () => {
|
||||
}
|
||||
getters = {
|
||||
'auth/isModerator': () => false,
|
||||
'auth/isAdmin': () => false,
|
||||
'auth/user': () => {
|
||||
return {}
|
||||
},
|
||||
'categories/categoriesActive': () => false,
|
||||
'pinnedPosts/maxPinnedPosts': () => 0,
|
||||
'pinnedPosts/currentlyPinnedPosts': () => 0,
|
||||
}
|
||||
actions = {
|
||||
'categories/init': jest.fn(),
|
||||
'pinnedPosts/fetch': jest.fn().mockResolvedValue(),
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@ -16,9 +16,14 @@ const stubs = {
|
||||
|
||||
describe('SearchResults', () => {
|
||||
let mocks, getters, propsData, wrapper
|
||||
|
||||
const Wrapper = () => {
|
||||
const store = new Vuex.Store({
|
||||
getters,
|
||||
actions: {
|
||||
'categories/init': jest.fn(),
|
||||
'pinnedPosts/fetch': jest.fn(),
|
||||
},
|
||||
})
|
||||
return mount(SearchResults, { mocks, localVue, propsData, store, stubs })
|
||||
}
|
||||
|
||||
@ -78,7 +78,11 @@ describe('ProfileSlug', () => {
|
||||
'auth/user': {
|
||||
id: 'u23',
|
||||
},
|
||||
'auth/isAdmin': () => false,
|
||||
'pinnedPosts/maxPinnedPosts': () => 0,
|
||||
'pinnedPosts/currentlyPinnedPosts': () => 0,
|
||||
},
|
||||
dispatch: jest.fn().mockResolvedValue(),
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user