X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fcheck-params%2Fuser-notifications.ts;h=6a588e4460a585ea056b67feded539289d1a40c3;hb=3f3530c3dbc5339b4cba53710b8568b4ad39152e;hp=7de2fda79c87e3e8b6cf374b7524d1b9c6531e42;hpb=e0faa8ad6e18ce6248ef1ec93a59dab5b05be468;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/check-params/user-notifications.ts b/server/tests/api/check-params/user-notifications.ts index 7de2fda79..6a588e446 100644 --- a/server/tests/api/check-params/user-notifications.ts +++ b/server/tests/api/check-params/user-notifications.ts @@ -233,7 +233,7 @@ describe('Test user notifications API validators', function () { describe('When connecting to my notification socket', function () { it('Should fail with no token', function (next) { - const socket = io(`http://localhost:${server.port}/user-notifications`, { reconnection: false }) + const socket = io(`${server.url}/user-notifications`, { reconnection: false }) socket.once('connect_error', function () { socket.disconnect() @@ -247,7 +247,7 @@ describe('Test user notifications API validators', function () { }) it('Should fail with an invalid token', function (next) { - const socket = io(`http://localhost:${server.port}/user-notifications`, { + const socket = io(`${server.url}/user-notifications`, { query: { accessToken: 'bad_access_token' }, reconnection: false }) @@ -264,7 +264,7 @@ describe('Test user notifications API validators', function () { }) it('Should success with the correct token', function (next) { - const socket = io(`http://localhost:${server.port}/user-notifications`, { + const socket = io(`${server.url}/user-notifications`, { query: { accessToken: server.accessToken }, reconnection: false })