mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
test von store commit publisherId, test store isAdmin
This commit is contained in:
parent
21b8110f57
commit
fc799a78eb
@ -11,6 +11,7 @@ const {
|
||||
coinanimation,
|
||||
newsletterState,
|
||||
publisherId,
|
||||
isAdmin,
|
||||
community,
|
||||
hasElopage,
|
||||
} = mutations
|
||||
@ -104,6 +105,15 @@ describe('Vuex store', () => {
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
describe('isAdmin', () => {
|
||||
it('sets the state of isAdmin', () => {
|
||||
const state = { isAdmin: null }
|
||||
isAdmin(state, true)
|
||||
expect(state.isAdmin).toEqual(true)
|
||||
})
|
||||
})
|
||||
|
||||
describe('community', () => {
|
||||
it('sets the state of community', () => {
|
||||
const state = {}
|
||||
|
||||
@ -229,8 +229,8 @@ describe('Register', () => {
|
||||
wrapper.find('#publisherid').setValue('12345')
|
||||
})
|
||||
|
||||
it('commits openCreationsMinus to store', () => {
|
||||
expect(storeCommitMock).toBeCalledWith('publisherId', 12345)
|
||||
it('commits publisherId to store', () => {
|
||||
expect(mockStoreCommit).toBeCalledWith('publisherId', 12345)
|
||||
})
|
||||
|
||||
it('has enabled submit button when completely filled', () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user