aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/utils/server/clients.ts
blob: 273aac74728ffe355258a68903c0ca3aa8e6280d (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 * as urlUtil from 'url'

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

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

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

export {
  getClient
}