From 8adf20a46607a5ecbe14150ae9306f50a5a4c55e Mon Sep 17 00:00:00 2001 From: Felix Wiedenbach Date: Tue, 13 Feb 2024 08:32:35 +0100 Subject: [PATCH] adjust tests to API v4 --- __tests__/node_helper.specs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/__tests__/node_helper.specs.js b/__tests__/node_helper.specs.js index 7107fe2..a3b8e37 100644 --- a/__tests__/node_helper.specs.js +++ b/__tests__/node_helper.specs.js @@ -20,14 +20,14 @@ describe('node_helper', () => { test('triggers data fetch without api_key if notification is GET_DATA', () => { helper.socketNotificationReceived('GET_DATA', {league: 'BL1'}); - expect(fetchMock).toHaveBeenNthCalledWith(1, 'http://api.football-data.org/v2/competitions/BL1/standings', {}); + expect(fetchMock).toHaveBeenNthCalledWith(1, 'http://api.football-data.org/v4/competitions/BL1/standings', {}); }); test('triggers data fetch with api key if notification is GET_DATA', () => { const apiKey = 'TEST_API_KEY'; helper.socketNotificationReceived('GET_DATA', {league: 'BL1', api_key: apiKey}); - expect(fetchMock).toHaveBeenNthCalledWith(1, 'http://api.football-data.org/v2/competitions/BL1/standings', { + expect(fetchMock).toHaveBeenNthCalledWith(1, 'http://api.football-data.org/v4/competitions/BL1/standings', { headers: { 'X-Auth-Token': apiKey }