-import * as request from 'supertest'
import { makeDeleteRequest, makeGetRequest, makePutBodyRequest } from '../'
-import { CustomConfig } from '../../../../shared/models/config/custom-config.model'
+import { CustomConfig } from '../../../../shared/models/server/custom-config.model'
function getConfig (url: string) {
const path = '/api/v1/config'
- return request(url)
- .get(path)
- .set('Accept', 'application/json')
- .expect(200)
- .expect('Content-Type', /json/)
+ return makeGetRequest({
+ url,
+ path,
+ statusCodeExpected: 200
+ })
+}
+
+function getAbout (url: string) {
+ const path = '/api/v1/config/about'
+
+ return makeGetRequest({
+ url,
+ path,
+ statusCodeExpected: 200
+ })
}
function getCustomConfig (url: string, token: string, statusCodeExpected = 200) {
getConfig,
getCustomConfig,
updateCustomConfig,
+ getAbout,
deleteCustomConfig
}