From 5c4247b14c61932c832f29dfa5dbc890c3a84c77 Mon Sep 17 00:00:00 2001 From: Daniel Hutzel Date: Wed, 13 Jul 2022 18:07:18 +0200 Subject: [PATCH] Fix usage of unqialified names with cds.db (#378) --- test/consuming-services.test.js | 2 +- test/messaging.test.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/consuming-services.test.js b/test/consuming-services.test.js index 20aeccb7..71c0b19e 100644 --- a/test/consuming-services.test.js +++ b/test/consuming-services.test.js @@ -14,7 +14,7 @@ describe('cap/samples - Consuming Services locally', () => { const AdminService = await cds.connect.to('AdminService') const { Authors } = AdminService.entities expect (await SELECT.from(Authors)) - .to.eql(await SELECT.from('Authors')) + // .to.eql(await SELECT.from('Authors')) .to.eql(await AdminService.read(Authors)) .to.eql(await AdminService.read('Authors')) .to.eql(await AdminService.run(SELECT.from(Authors))) diff --git a/test/messaging.test.js b/test/messaging.test.js index d1426a8a..6ecfa6ce 100644 --- a/test/messaging.test.js +++ b/test/messaging.test.js @@ -4,11 +4,13 @@ const _model = '@capire/reviews' if (cds.User.default) cds.User.default = cds.User.Privileged // hard core monkey patch else cds.User = cds.User.Privileged // hard core monkey patch for older cds releases +const Reviews = 'sap.capire.reviews.Reviews' + describe('cap/samples - Messaging', ()=>{ it ('should bootstrap sqlite in-memory db', async()=>{ const db = await cds.deploy (_model) .to ('sqlite::memory:') - await db.delete('Reviews') + await db.delete(Reviews) expect (db.model) .not.undefined })