From 54774a775f8d75ab35e31bcbeccae8449605c5be Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Mon, 18 Dec 2023 12:22:09 +0100 Subject: [PATCH] Fix HTTP request mock Signed-off-by: Louis Chemineau --- __mocks__/@nextcloud/axios.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/__mocks__/@nextcloud/axios.js b/__mocks__/@nextcloud/axios.js index 3addffbed..f48608e61 100644 --- a/__mocks__/@nextcloud/axios.js +++ b/__mocks__/@nextcloud/axios.js @@ -2,9 +2,9 @@ const axios = jest.createMockFromModule('@nextcloud/axios') const wsData = require('./activity_ws.json') -axios.get = function(url) { +axios.get = function (url) { return new Promise((resolve, reject) => { - if (url === 'http://localhostundefined/ocs/v2.php/apps/activity/api/v2/activity/filter') { + if (url === 'http://localhost/ocs/v2.php/apps/activity/api/v2/activity/filter') { resolve({ data: wsData }) } else { // eslint-disable-next-line no-console