diff --git a/admin/src/components/NavBar.spec.js b/admin/src/components/NavBar.spec.js index 6871cb4f7..621ba0eb9 100644 --- a/admin/src/components/NavBar.spec.js +++ b/admin/src/components/NavBar.spec.js @@ -53,13 +53,17 @@ describe('NavBar', () => { }) describe('logout', () => { - // const assignLocationSpy = jest.fn() + const windowLocationMock = jest.fn() beforeEach(async () => { + delete window.location + window.location = { + assign: windowLocationMock, + } await wrapper.findAll('a').at(6).trigger('click') }) it('redirects to /logout', () => { - expect(routerPushMock).toBeCalledWith('/logout') + expect(windowLocationMock).toBeCalledWith('http://localhost/vue/login') }) it('dispatches logout to store', () => { diff --git a/admin/src/components/NavBar.vue b/admin/src/components/NavBar.vue index 11e9153a3..c1c315755 100644 --- a/admin/src/components/NavBar.vue +++ b/admin/src/components/NavBar.vue @@ -33,7 +33,8 @@ export default { name: 'navbar', methods: { logout() { - window.location = CONFIG.WALLET_URL + window.location.assign(CONFIG.WALLET_URL) + // window.location = CONFIG.WALLET_URL this.$store.dispatch('logout') }, wallet() {