diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-12-07 14:32:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-07 14:32:36 +0100 |
commit | 2d53be0267acc49cda46707b885096193a1f4e9c (patch) | |
tree | 887061a34bc67f40acbb96a6278f9544bf83caeb /shared/extra-utils/server/clients.ts | |
parent | adc1f09c0dbd997f34028c1c82d1c118dc8ead80 (diff) | |
download | PeerTube-2d53be0267acc49cda46707b885096193a1f4e9c.tar.gz PeerTube-2d53be0267acc49cda46707b885096193a1f4e9c.tar.zst PeerTube-2d53be0267acc49cda46707b885096193a1f4e9c.zip |
replace numbers with typed http status codes (#3409)
Diffstat (limited to 'shared/extra-utils/server/clients.ts')
-rw-r--r-- | shared/extra-utils/server/clients.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/shared/extra-utils/server/clients.ts b/shared/extra-utils/server/clients.ts index dc631e823..894fe4911 100644 --- a/shared/extra-utils/server/clients.ts +++ b/shared/extra-utils/server/clients.ts | |||
@@ -1,5 +1,6 @@ | |||
1 | import * as request from 'supertest' | 1 | import * as request from 'supertest' |
2 | import { URL } from 'url' | 2 | import { URL } from 'url' |
3 | import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' | ||
3 | 4 | ||
4 | function getClient (url: string) { | 5 | function getClient (url: string) { |
5 | const path = '/api/v1/oauth-clients/local' | 6 | const path = '/api/v1/oauth-clients/local' |
@@ -8,7 +9,7 @@ function getClient (url: string) { | |||
8 | .get(path) | 9 | .get(path) |
9 | .set('Host', new URL(url).host) | 10 | .set('Host', new URL(url).host) |
10 | .set('Accept', 'application/json') | 11 | .set('Accept', 'application/json') |
11 | .expect(200) | 12 | .expect(HttpStatusCode.OK_200) |
12 | .expect('Content-Type', /json/) | 13 | .expect('Content-Type', /json/) |
13 | } | 14 | } |
14 | 15 | ||