This commit is contained in:
Christian Georgi
2022-06-21 15:52:40 +02:00
committed by Christian Georgi
parent bf2b12e4e8
commit cae45fcd87
3 changed files with 18 additions and 1 deletions

17
test/fiori.test.js Normal file
View File

@@ -0,0 +1,17 @@
const cds = require('@sap/cds/lib')
const { GET, expect, axios } = cds.test ('@capire/fiori', '--with-mocks')
axios.defaults.auth = { username: 'alice', password: 'admin' }
describe('cap/samples - Fiori APIs', () => {
it('serves $metadata documents in v2', async () => {
const { headers, data } = await GET `/v2/browse/$metadata`
expect(headers).to.contain({
'content-type': 'application/xml',
'dataserviceversion': '2.0',
})
expect(data).to.contain('<EntitySet Name="GenreHierarchy" EntityType="CatalogService.GenreHierarchy"/>')
})
})