aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils/clients.js
blob: b3ae18d01f346e1de1576e1e534b4cd4004eac32 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
'use strict'

const request = require('supertest')

const clientsUtils = {
  getClient: getClient
}

// ---------------------- Export functions --------------------

function getClient (url, end) {
  const path = '/api/v1/clients/local'

  request(url)
    .get(path)
    .set('Accept', 'application/json')
    .expect(200)
    .expect('Content-Type', /json/)
    .end(end)
}

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

module.exports = clientsUtils