test von store commit publisherId, test store isAdmin

This commit is contained in:
ogerly 2021-12-02 09:19:35 +01:00
parent 21b8110f57
commit fc799a78eb
2 changed files with 12 additions and 2 deletions

View File

@ -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 = {}

View File

@ -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', () => {