mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
test RESET_POST_TYPE
This commit is contained in:
parent
72ef3fe6f2
commit
ff41c04cf9
@ -289,6 +289,27 @@ describe('mutations', () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
describe('RESET_POST_TYPE', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
testMutation = () => {
|
||||||
|
mutations.RESET_POST_TYPE(state)
|
||||||
|
return getters.filter(state)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
it('resets the post type filter, event start and order', () => {
|
||||||
|
state = {
|
||||||
|
filter: {
|
||||||
|
postType_in: ['Event'],
|
||||||
|
eventStart_gte: new Date(),
|
||||||
|
},
|
||||||
|
order: 'eventStart_asc',
|
||||||
|
}
|
||||||
|
expect(testMutation()).toEqual({})
|
||||||
|
expect(getters.orderBy(state)).toEqual('createdAt_desc')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
describe('TOGGLE_EVENTS_ENDED', () => {
|
describe('TOGGLE_EVENTS_ENDED', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
testMutation = (postType) => {
|
testMutation = (postType) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user