aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/server/clients.ts
blob: dc631e82318d3dd034aa5f7486f1314345b47987 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import * as request from 'supertest'
import { URL } from 'url'

function getClient (url: string) {
  const path = '/api/v1/oauth-clients/local'

  return request(url)
          .get(path)
          .set('Host', new URL(url).host)
          .set('Accept', 'application/json')
          .expect(200)
          .expect('Content-Type', /json/)
}

// ---------------------------------------------------------------------------

export {
  getClient
}