aboutsummaryrefslogblamecommitdiffhomepage
path: root/shared/extra-utils/server/clients.ts
blob: 273aac74728ffe355258a68903c0ca3aa8e6280d (plain) (tree)
1
2
3
4
5
6
7
8
9
                                    
                              

                                  
                                            


                     
                                               









                                                                              
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
}