mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge branch 'master' into adminConfirmPendingCreation
This commit is contained in:
commit
7d75c0560e
@ -40,6 +40,11 @@ const mocks = {
|
||||
$toasted: {
|
||||
error: toastedErrorMock,
|
||||
},
|
||||
$moment: jest.fn((value) => {
|
||||
return {
|
||||
format: jest.fn((format) => value),
|
||||
}
|
||||
}),
|
||||
}
|
||||
|
||||
describe('CreationConfirm', () => {
|
||||
|
||||
@ -1,11 +1,13 @@
|
||||
import store, { mutations, actions } from './store'
|
||||
import CONFIG from '../config'
|
||||
|
||||
const { token, openCreationsPlus, openCreationsMinus, resetOpenCreations } = mutations
|
||||
jest.mock('../config')
|
||||
|
||||
const { token, openCreationsPlus, openCreationsMinus, resetOpenCreations, setOpenCreations } =
|
||||
mutations
|
||||
const { logout } = actions
|
||||
|
||||
const CONFIG = {
|
||||
DEBUG_DISABLE_AUTH: true,
|
||||
}
|
||||
CONFIG.DEBUG_DISABLE_AUTH = true
|
||||
|
||||
describe('Vuex store', () => {
|
||||
describe('mutations', () => {
|
||||
@ -40,6 +42,14 @@ describe('Vuex store', () => {
|
||||
expect(state.openCreations).toEqual(0)
|
||||
})
|
||||
})
|
||||
|
||||
describe('setOpenCreations', () => {
|
||||
it('sets the open creations to given value', () => {
|
||||
const state = { openCreations: 24 }
|
||||
setOpenCreations(state, 12)
|
||||
expect(state.openCreations).toEqual(12)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('actions', () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user