Fully revert hacks (#727)
This commit is contained in:
@@ -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"/>')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -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"/>')
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user