Fully revert hacks (#727)

This commit is contained in:
Daniel Hutzel
2024-05-29 09:58:02 +02:00
committed by GitHub
parent a191c4fd50
commit 85f24970de
2 changed files with 3 additions and 4 deletions

View File

@@ -9,7 +9,7 @@ describe('cap/samples - Localized Data', () => {
it('serves localized $metadata documents', async () => { it('serves localized $metadata documents', async () => {
const { data } = await GET(`/browse/$metadata?sap-language=de`, { headers: { 'accept-language': 'de', accept: 'application/xml' }}) const { data } = await GET(`/browse/$metadata?sap-language=de`, { headers: { 'accept-language': 'de' }})
expect(data).to.contain('<Annotation Term="Common.Label" String="Währung"/>') expect(data).to.contain('<Annotation Term="Common.Label" String="Währung"/>')
}) })

View File

@@ -5,13 +5,12 @@ describe('cap/samples - Bookshop APIs', () => {
axios.defaults.auth = { username: 'alice', password: 'admin' } axios.defaults.auth = { username: 'alice', password: 'admin' }
it('serves $metadata documents in v4', async () => { it('serves $metadata documents in v4', async () => {
const { headers, status, data } = await GET(`/browse/$metadata`, { headers: { accept: 'application/xml' } }) const { headers, status, data } = await GET `/browse/$metadata`
expect(status).to.equal(200) expect(status).to.equal(200)
expect(headers).to.contain({ expect(headers).to.contain({
// 'content-type': 'application/xml', //> fails with 'application/xml;charset=utf-8' 'content-type': 'application/xml',
'odata-version': '4.0', 'odata-version': '4.0',
}) })
expect(headers['content-type']).to.match(/application\/xml/)
expect(data).to.contain('<EntitySet Name="Books" EntityType="CatalogService.Books">') expect(data).to.contain('<EntitySet Name="Books" EntityType="CatalogService.Books">')
expect(data).to.contain('<Annotation Term="Common.Label" String="Currency"/>') expect(data).to.contain('<Annotation Term="Common.Label" String="Currency"/>')
}) })