]>
Commit | Line | Data |
---|---|---|
0e1dc3e7 | 1 | import * as request from 'supertest' |
a1587156 | 2 | import { URL } from 'url' |
0e1dc3e7 C |
3 | |
4 | function getClient (url: string) { | |
8df87ce7 | 5 | const path = '/api/v1/oauth-clients/local' |
0e1dc3e7 C |
6 | |
7 | return request(url) | |
8 | .get(path) | |
a1587156 | 9 | .set('Host', new URL(url).host) |
0e1dc3e7 C |
10 | .set('Accept', 'application/json') |
11 | .expect(200) | |
12 | .expect('Content-Type', /json/) | |
13 | } | |
14 | ||
15 | // --------------------------------------------------------------------------- | |
16 | ||
17 | export { | |
18 | getClient | |
19 | } |