diff --git a/frontend/src/store/store.js b/frontend/src/store/store.js index fb74624fb..458c8c8de 100644 --- a/frontend/src/store/store.js +++ b/frontend/src/store/store.js @@ -47,9 +47,6 @@ export const mutations = { hasElopage: (state, hasElopage) => { state.hasElopage = hasElopage }, - redeemCode: (state, redeemCode) => { - state.redeemCode = redeemCode - }, } export const actions = { @@ -76,7 +73,6 @@ export const actions = { commit('hasElopage', false) commit('publisherId', null) commit('isAdmin', false) - commit('redeemCode', null) localStorage.clear() }, } @@ -106,7 +102,6 @@ try { }, hasElopage: false, publisherId: null, - redeemCode: null, }, getters: {}, // Syncronous mutation of the state diff --git a/frontend/src/store/store.test.js b/frontend/src/store/store.test.js index 29a703e8f..ea40d9474 100644 --- a/frontend/src/store/store.test.js +++ b/frontend/src/store/store.test.js @@ -26,7 +26,6 @@ const { isAdmin, community, hasElopage, - redeemCode, } = mutations const { login, logout } = actions @@ -142,14 +141,6 @@ 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') - }) - }) }) }) @@ -228,7 +219,7 @@ describe('Vuex store', () => { it('calls nine commits', () => { logout({ commit, state }) - expect(commit).toHaveBeenCalledTimes(10) + expect(commit).toHaveBeenCalledTimes(9) }) it('commits token', () => {