aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils/request-schedulers.ts
blob: ae8227b7905c6335d33bd70b395b4465f1fab951 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import * as request from 'supertest'

function getRequestsStats (server: { url: string }, accessToken: string) {
  const path = '/api/v1/requests/stats'

  return request(server.url)
          .get(path)
          .set('Accept', 'application/json')
          .set('Authorization', 'Bearer ' + accessToken)
          .expect(200)
          .expect('Content-Type', /json/)
}

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

export {
  getRequestsStats
}