Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit 8d8aa6c

Browse files
committed
Fixing copy errors
Signed-off-by: Daniel <daniel.hutzel@sap.com>
1 parent 756ed48 commit 8d8aa6c

4 files changed

Lines changed: 38 additions & 25 deletions

File tree

bookshop/srv/cat-service.cds

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ service CatalogService @(path:'/browse') {
1111
} excluding { createdBy, modifiedBy };
1212

1313
@requires: 'authenticated-user'
14-
action submitOrder ( book: Books:ID, amount: Integer ) returns { stock: Integer };
15-
event OrderedBook : { book: Books:ID; amount: Integer; buyer: String };
14+
action submitOrder ( book: Books:ID, quantity: Integer ) returns { stock: Integer };
15+
event OrderedBook : { book: Books:ID; quantity: Integer; buyer: String };
1616
}

bookshop/test/requests.http

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,19 @@ GET {{server}}/admin/Authors?
3232
# &sap-language=de
3333
Authorization: Basic alice:
3434

35+
### ------------------------------------------------------------------------
36+
# Create Author
37+
POST {{server}}/admin/Authors
38+
Content-Type: application/json;IEEE754Compatible=true
39+
Authorization: Basic alice:
40+
41+
{
42+
"ID": 112,
43+
"name": "Shakespeeeeere",
44+
"age": 22
45+
}
46+
47+
3548
### ------------------------------------------------------------------------
3649
# Create book
3750
POST {{server}}/admin/Books

test/localized-data.test.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,39 +11,39 @@ describe('Localized Data', () => {
1111
})
1212

1313
it('supports sap-language param', async () => {
14-
const { data } = await GET(`/browse/Books?$select=title,authorName` + '&sap-language=de')
14+
const { data } = await GET(`/browse/Books?$select=title,author` + '&sap-language=de')
1515
expect(data.value).to.containSubset([
16-
{ title: 'Sturmhöhe', authorName: 'Emily Brontë' },
17-
{ title: 'Jane Eyre', authorName: 'Charlotte Brontë' },
18-
{ title: 'The Raven', authorName: 'Edgar Allen Poe' },
19-
{ title: 'Eleonora', authorName: 'Edgar Allen Poe' },
20-
{ title: 'Catweazle', authorName: 'Richard Carpenter' },
16+
{ title: 'Sturmhöhe', author: 'Emily Brontë' },
17+
{ title: 'Jane Eyre', author: 'Charlotte Brontë' },
18+
{ title: 'The Raven', author: 'Edgar Allen Poe' },
19+
{ title: 'Eleonora', author: 'Edgar Allen Poe' },
20+
{ title: 'Catweazle', author: 'Richard Carpenter' },
2121
])
2222
})
2323

2424
it('supports accept-language header', async () => {
25-
const { data } = await GET(`/browse/Books?$select=title,authorName`, {
25+
const { data } = await GET(`/browse/Books?$select=title,author`, {
2626
headers: { 'Accept-Language': 'de' },
2727
})
2828
expect(data.value).to.containSubset([
29-
{ title: 'Sturmhöhe', authorName: 'Emily Brontë' },
30-
{ title: 'Jane Eyre', authorName: 'Charlotte Brontë' },
31-
{ title: 'The Raven', authorName: 'Edgar Allen Poe' },
32-
{ title: 'Eleonora', authorName: 'Edgar Allen Poe' },
33-
{ title: 'Catweazle', authorName: 'Richard Carpenter' },
29+
{ title: 'Sturmhöhe', author: 'Emily Brontë' },
30+
{ title: 'Jane Eyre', author: 'Charlotte Brontë' },
31+
{ title: 'The Raven', author: 'Edgar Allen Poe' },
32+
{ title: 'Eleonora', author: 'Edgar Allen Poe' },
33+
{ title: 'Catweazle', author: 'Richard Carpenter' },
3434
])
3535
})
3636

3737
it('supports queries with $expand', async () => {
38-
const { data } = await GET(`/browse/Books?&$select=title,authorName&$expand=currency`, {
38+
const { data } = await GET(`/browse/Books?&$select=title,author&$expand=currency`, {
3939
headers: { 'Accept-Language': 'de' },
4040
})
4141
expect(data.value).to.containSubset([
42-
{ title: 'Sturmhöhe', authorName: 'Emily Brontë', currency: { name: 'Pfund' } },
43-
{ title: 'Jane Eyre', authorName: 'Charlotte Brontë', currency: { name: 'Pfund' } },
44-
{ title: 'The Raven', authorName: 'Edgar Allen Poe', currency: { name: 'US-Dollar' } },
45-
{ title: 'Eleonora', authorName: 'Edgar Allen Poe', currency: { name: 'US-Dollar' } },
46-
{ title: 'Catweazle', authorName: 'Richard Carpenter', currency: { name: 'Yen' } },
42+
{ title: 'Sturmhöhe', author: 'Emily Brontë', currency: { name: 'Pfund' } },
43+
{ title: 'Jane Eyre', author: 'Charlotte Brontë', currency: { name: 'Pfund' } },
44+
{ title: 'The Raven', author: 'Edgar Allen Poe', currency: { name: 'US-Dollar' } },
45+
{ title: 'Eleonora', author: 'Edgar Allen Poe', currency: { name: 'US-Dollar' } },
46+
{ title: 'Catweazle', author: 'Richard Carpenter', currency: { name: 'Yen' } },
4747
])
4848
})
4949

test/odata.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ describe('OData Protocol', () => {
1919

2020
it('supports $search in multiple fields', async () => {
2121
const { data } = await GET `/browse/Books ${{
22-
params: { $search: 'Po', $select: `title,authorName` },
22+
params: { $search: 'Po', $select: `title,author` },
2323
}}`
2424
expect(data.value).to.eql([
25-
{ ID: 201, title: 'Wuthering Heights', authorName: 'Emily Brontë' },
26-
{ ID: 207, title: 'Jane Eyre', authorName: 'Charlotte Brontë' },
27-
{ ID: 251, title: 'The Raven', authorName: 'Edgar Allen Poe' },
28-
{ ID: 252, title: 'Eleonora', authorName: 'Edgar Allen Poe' },
25+
{ ID: 201, title: 'Wuthering Heights', author: 'Emily Brontë' },
26+
{ ID: 207, title: 'Jane Eyre', author: 'Charlotte Brontë' },
27+
{ ID: 251, title: 'The Raven', author: 'Edgar Allen Poe' },
28+
{ ID: 252, title: 'Eleonora', author: 'Edgar Allen Poe' },
2929
])
3030
})
3131

0 commit comments

Comments
 (0)