mirror of
https://github.com/KeygraphHQ/juice-shop.git
synced 2026-11-10 02:31:39 -10:00
34 lines
937 B
TypeScript
34 lines
937 B
TypeScript
/*
|
|
* Copyright (c) 2014-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
import * as frisby from 'frisby'
|
|
import * as utils from '../../lib/utils'
|
|
|
|
const Joi = frisby.Joi
|
|
|
|
const REST_URL = 'http://localhost:3000/rest/admin'
|
|
|
|
describe('/rest/admin/application-version', () => {
|
|
it('GET application version from package.json', () => {
|
|
return frisby.get(REST_URL + '/application-version')
|
|
.expect('status', 200)
|
|
.expect('header', 'content-type', /application\/json/)
|
|
.expect('json', {
|
|
version: utils.version()
|
|
})
|
|
})
|
|
})
|
|
|
|
describe('/rest/admin/application-configuration', () => {
|
|
it('GET application configuration', () => {
|
|
return frisby.get(REST_URL + '/application-configuration')
|
|
.expect('status', 200)
|
|
.expect('header', 'content-type', /application\/json/)
|
|
.expect('jsonTypes', {
|
|
config: Joi.object()
|
|
})
|
|
})
|
|
})
|