2016-08-07 22:09:59 +02:00
|
|
|
'use strict'
|
|
|
|
|
|
|
|
const request = require('supertest')
|
|
|
|
|
|
|
|
const clientsUtils = {
|
|
|
|
getClient: getClient
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------- Export functions --------------------
|
|
|
|
|
|
|
|
function getClient (url, end) {
|
2016-10-10 21:33:40 +02:00
|
|
|
const path = '/api/v1/clients/local'
|
2016-08-07 22:09:59 +02:00
|
|
|
|
|
|
|
request(url)
|
|
|
|
.get(path)
|
|
|
|
.set('Accept', 'application/json')
|
|
|
|
.expect(200)
|
|
|
|
.expect('Content-Type', /json/)
|
|
|
|
.end(end)
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
module.exports = clientsUtils
|