diff options
Diffstat (limited to 'server/tests/api/check-params/user-subscriptions.ts')
-rw-r--r-- | server/tests/api/check-params/user-subscriptions.ts | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/server/tests/api/check-params/user-subscriptions.ts b/server/tests/api/check-params/user-subscriptions.ts index a0e663e25..c4922c7a2 100644 --- a/server/tests/api/check-params/user-subscriptions.ts +++ b/server/tests/api/check-params/user-subscriptions.ts | |||
@@ -104,7 +104,7 @@ describe('Test user subscriptions API validators', function () { | |||
104 | await makePostBodyRequest({ | 104 | await makePostBodyRequest({ |
105 | url: server.url, | 105 | url: server.url, |
106 | path, | 106 | path, |
107 | fields: { uri: 'user1_channel@localhost:' + server.port }, | 107 | fields: { uri: 'user1_channel@' + server.host }, |
108 | expectedStatus: HttpStatusCode.UNAUTHORIZED_401 | 108 | expectedStatus: HttpStatusCode.UNAUTHORIZED_401 |
109 | }) | 109 | }) |
110 | }) | 110 | }) |
@@ -142,7 +142,7 @@ describe('Test user subscriptions API validators', function () { | |||
142 | url: server.url, | 142 | url: server.url, |
143 | path, | 143 | path, |
144 | token: server.accessToken, | 144 | token: server.accessToken, |
145 | fields: { uri: 'user1_channel@localhost:' + server.port }, | 145 | fields: { uri: 'user1_channel@' + server.host }, |
146 | expectedStatus: HttpStatusCode.NO_CONTENT_204 | 146 | expectedStatus: HttpStatusCode.NO_CONTENT_204 |
147 | }) | 147 | }) |
148 | 148 | ||
@@ -154,7 +154,7 @@ describe('Test user subscriptions API validators', function () { | |||
154 | it('Should fail with a non authenticated user', async function () { | 154 | it('Should fail with a non authenticated user', async function () { |
155 | await makeGetRequest({ | 155 | await makeGetRequest({ |
156 | url: server.url, | 156 | url: server.url, |
157 | path: path + '/user1_channel@localhost:' + server.port, | 157 | path: path + '/user1_channel@' + server.host, |
158 | expectedStatus: HttpStatusCode.UNAUTHORIZED_401 | 158 | expectedStatus: HttpStatusCode.UNAUTHORIZED_401 |
159 | }) | 159 | }) |
160 | }) | 160 | }) |
@@ -185,7 +185,7 @@ describe('Test user subscriptions API validators', function () { | |||
185 | it('Should fail with an unknown subscription', async function () { | 185 | it('Should fail with an unknown subscription', async function () { |
186 | await makeGetRequest({ | 186 | await makeGetRequest({ |
187 | url: server.url, | 187 | url: server.url, |
188 | path: path + '/root1@localhost:' + server.port, | 188 | path: path + '/root1@' + server.host, |
189 | token: server.accessToken, | 189 | token: server.accessToken, |
190 | expectedStatus: HttpStatusCode.NOT_FOUND_404 | 190 | expectedStatus: HttpStatusCode.NOT_FOUND_404 |
191 | }) | 191 | }) |
@@ -194,7 +194,7 @@ describe('Test user subscriptions API validators', function () { | |||
194 | it('Should succeed with the correct parameters', async function () { | 194 | it('Should succeed with the correct parameters', async function () { |
195 | await makeGetRequest({ | 195 | await makeGetRequest({ |
196 | url: server.url, | 196 | url: server.url, |
197 | path: path + '/user1_channel@localhost:' + server.port, | 197 | path: path + '/user1_channel@' + server.host, |
198 | token: server.accessToken, | 198 | token: server.accessToken, |
199 | expectedStatus: HttpStatusCode.OK_200 | 199 | expectedStatus: HttpStatusCode.OK_200 |
200 | }) | 200 | }) |
@@ -234,7 +234,7 @@ describe('Test user subscriptions API validators', function () { | |||
234 | await makeGetRequest({ | 234 | await makeGetRequest({ |
235 | url: server.url, | 235 | url: server.url, |
236 | path: existPath, | 236 | path: existPath, |
237 | query: { 'uris[]': 'coucou@localhost:' + server.port }, | 237 | query: { 'uris[]': 'coucou@' + server.host }, |
238 | token: server.accessToken, | 238 | token: server.accessToken, |
239 | expectedStatus: HttpStatusCode.OK_200 | 239 | expectedStatus: HttpStatusCode.OK_200 |
240 | }) | 240 | }) |
@@ -245,7 +245,7 @@ describe('Test user subscriptions API validators', function () { | |||
245 | it('Should fail with a non authenticated user', async function () { | 245 | it('Should fail with a non authenticated user', async function () { |
246 | await makeDeleteRequest({ | 246 | await makeDeleteRequest({ |
247 | url: server.url, | 247 | url: server.url, |
248 | path: path + '/user1_channel@localhost:' + server.port, | 248 | path: path + '/user1_channel@' + server.host, |
249 | expectedStatus: HttpStatusCode.UNAUTHORIZED_401 | 249 | expectedStatus: HttpStatusCode.UNAUTHORIZED_401 |
250 | }) | 250 | }) |
251 | }) | 251 | }) |
@@ -276,7 +276,7 @@ describe('Test user subscriptions API validators', function () { | |||
276 | it('Should fail with an unknown subscription', async function () { | 276 | it('Should fail with an unknown subscription', async function () { |
277 | await makeDeleteRequest({ | 277 | await makeDeleteRequest({ |
278 | url: server.url, | 278 | url: server.url, |
279 | path: path + '/root1@localhost:' + server.port, | 279 | path: path + '/root1@' + server.host, |
280 | token: server.accessToken, | 280 | token: server.accessToken, |
281 | expectedStatus: HttpStatusCode.NOT_FOUND_404 | 281 | expectedStatus: HttpStatusCode.NOT_FOUND_404 |
282 | }) | 282 | }) |
@@ -285,7 +285,7 @@ describe('Test user subscriptions API validators', function () { | |||
285 | it('Should succeed with the correct parameters', async function () { | 285 | it('Should succeed with the correct parameters', async function () { |
286 | await makeDeleteRequest({ | 286 | await makeDeleteRequest({ |
287 | url: server.url, | 287 | url: server.url, |
288 | path: path + '/user1_channel@localhost:' + server.port, | 288 | path: path + '/user1_channel@' + server.host, |
289 | token: server.accessToken, | 289 | token: server.accessToken, |
290 | expectedStatus: HttpStatusCode.NO_CONTENT_204 | 290 | expectedStatus: HttpStatusCode.NO_CONTENT_204 |
291 | }) | 291 | }) |