From c69f7af3906e5d88f321350813ec42cc692bd6f4 Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 21 Oct 2024 13:38:35 +0200 Subject: [PATCH] test: refs #8039 axios not notify --- test/vitest/__tests__/boot/axios.spec.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/test/vitest/__tests__/boot/axios.spec.js b/test/vitest/__tests__/boot/axios.spec.js index 7a802b4d2..19d396ec5 100644 --- a/test/vitest/__tests__/boot/axios.spec.js +++ b/test/vitest/__tests__/boot/axios.spec.js @@ -36,8 +36,6 @@ describe('Axios boot', () => { describe('onResponseError()', async () => { it('should call to the Notify plugin with a message error for an status code "500"', async () => { - Notify.create = vi.fn(); - const error = { response: { status: 500, @@ -45,19 +43,10 @@ describe('Axios boot', () => { }; const result = onResponseError(error); - expect(result).rejects.toEqual(expect.objectContaining(error)); - expect(Notify.create).toHaveBeenCalledWith( - expect.objectContaining({ - message: 'An internal server error has ocurred', - type: 'negative', - }) - ); }); it('should call to the Notify plugin with a message from the response property', async () => { - Notify.create = vi.fn(); - const error = { response: { status: 401, @@ -70,14 +59,7 @@ describe('Axios boot', () => { }; const result = onResponseError(error); - expect(result).rejects.toEqual(expect.objectContaining(error)); - expect(Notify.create).toHaveBeenCalledWith( - expect.objectContaining({ - message: 'Invalid user or password', - type: 'negative', - }) - ); }); }); });