1 import * as request from 'supertest'
2 import { makeDeleteRequest, makeGetRequest, makePutBodyRequest } from '../'
3 import { CustomConfig } from '../../../../shared/models/config/custom-config.model'
5 function getConfig (url: string) {
6 const path = '/api/v1/config'
10 .set('Accept', 'application/json')
12 .expect('Content-Type', /json/)
15 function getCustomConfig (url: string, token: string, statusCodeExpected = 200) {
16 const path = '/api/v1/config/custom'
18 return makeGetRequest({
26 function updateCustomConfig (url: string, token: string, newCustomConfig: CustomConfig, statusCodeExpected = 200) {
27 const path = '/api/v1/config/custom'
29 return makePutBodyRequest({
33 fields: newCustomConfig,
38 function deleteCustomConfig (url: string, token: string, statusCodeExpected = 200) {
39 const path = '/api/v1/config/custom'
41 return makeDeleteRequest({
49 // ---------------------------------------------------------------------------