Rename amount -> quantity

This commit is contained in:
Daniel
2021-09-08 15:27:07 +02:00
committed by Christian Georgi
parent 48d547e6cd
commit 19083d156e
11 changed files with 37 additions and 37 deletions

View File

@@ -6,9 +6,9 @@ else cds.User = cds.User.Privileged // hard core monkey patch for older cds rele
describe('Custom Handlers', () => {
it('should reject out-of-stock orders', async () => {
await POST `/browse/submitOrder ${{ book: 201, amount: 5 }}`
await POST `/browse/submitOrder ${{ book: 201, amount: 5 }}`
await expect(POST `/browse/submitOrder ${{ book: 201, amount: 5 }}`).to.be.rejectedWith(/409 - 5 exceeds stock for book #201/)
await POST `/browse/submitOrder ${{ book: 201, quantity: 5 }}`
await POST `/browse/submitOrder ${{ book: 201, quantity: 5 }}`
await expect(POST `/browse/submitOrder ${{ book: 201, quantity: 5 }}`).to.be.rejectedWith(/409 - 5 exceeds stock for book #201/)
const { data } = await GET`/admin/Books/201/stock/$value`
expect(data).to.equal(2)
})