diff --git a/frontend/src/store/store.test.js b/frontend/src/store/store.test.js index 829678b44..051c16102 100644 --- a/frontend/src/store/store.test.js +++ b/frontend/src/store/store.test.js @@ -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 = {} diff --git a/frontend/src/views/Pages/Register.spec.js b/frontend/src/views/Pages/Register.spec.js index ed4908d86..d6814bd49 100644 --- a/frontend/src/views/Pages/Register.spec.js +++ b/frontend/src/views/Pages/Register.spec.js @@ -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', () => {