From bf479ad6a6c1bec911293fd0153c96326973ddb6 Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Wed, 3 Apr 2019 09:46:59 +0800 Subject: [PATCH] Fix alerting --- resources/assets/src/views/user/Bind.vue | 2 +- resources/assets/tests/views/user/Bind.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/assets/src/views/user/Bind.vue b/resources/assets/src/views/user/Bind.vue index c8feee84..02028c4f 100644 --- a/resources/assets/src/views/user/Bind.vue +++ b/resources/assets/src/views/user/Bind.vue @@ -61,7 +61,7 @@ export default { ) this.pending = false if (errno === 0) { - await this.$alert({ message: msg, type: 'success' }) + await this.$alert(msg) window.location.href = `${blessing.base_url}/user` } else { this.message = msg diff --git a/resources/assets/tests/views/user/Bind.test.ts b/resources/assets/tests/views/user/Bind.test.ts index c8d5d798..7855bdf2 100644 --- a/resources/assets/tests/views/user/Bind.test.ts +++ b/resources/assets/tests/views/user/Bind.test.ts @@ -35,5 +35,5 @@ test('submit', async () => { form.trigger('submit') await wrapper.vm.$nextTick() - expect(Vue.prototype.$alert).toBeCalledWith({ message: 'ok', type: 'success' }) + expect(Vue.prototype.$alert).toBeCalledWith('ok') })