mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
test frontend/src/store/store.test.js ok
This commit is contained in:
parent
99575cc2f5
commit
a14f98e4ee
@ -26,6 +26,7 @@ const {
|
||||
isAdmin,
|
||||
community,
|
||||
hasElopage,
|
||||
redeemCode,
|
||||
} = mutations
|
||||
const { login, logout } = actions
|
||||
|
||||
@ -141,6 +142,14 @@ describe('Vuex store', () => {
|
||||
hasElopage(state, true)
|
||||
expect(state.hasElopage).toBeTruthy()
|
||||
})
|
||||
|
||||
describe('redeemCode', () => {
|
||||
it('sets the state of token', () => {
|
||||
const state = { redeemCode: null }
|
||||
redeemCode(state, 'a0000b0000c0000')
|
||||
expect(state.redeemCode).toEqual('a0000b0000c0000')
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@ -219,7 +228,7 @@ describe('Vuex store', () => {
|
||||
|
||||
it('calls nine commits', () => {
|
||||
logout({ commit, state })
|
||||
expect(commit).toHaveBeenCalledTimes(9)
|
||||
expect(commit).toHaveBeenCalledTimes(10)
|
||||
})
|
||||
|
||||
it('commits token', () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user