diff --git a/hello/srv/world.cds b/hello/srv/world.cds index 949f5c2e..0bceafcb 100644 --- a/hello/srv/world.cds +++ b/hello/srv/world.cds @@ -1,3 +1,3 @@ -service say @(path: '/say') { +service say { function hello (to:String) returns String; -} +} \ No newline at end of file diff --git a/hello/test/hello-world-test.js b/hello/test/hello-world-test.js deleted file mode 100644 index 76149534..00000000 --- a/hello/test/hello-world-test.js +++ /dev/null @@ -1,10 +0,0 @@ -const cds = require ('@sap/cds') -describe('Hello world!', () => { - const {GET} = cds.test.in(__dirname,'../srv').run('serve', 'world.cds') - - it('should say hello with class impl', async () => { - const {data} = await GET`/say/hello(to='world')` - expect(data.value).to.match(/Hello world.*typescript.*/i) - }) - -}) diff --git a/hello/test/test.http b/hello/test/test.http index e3ab0a6f..6e530877 100644 --- a/hello/test/test.http +++ b/hello/test/test.http @@ -1 +1,5 @@ -GET http://localhost:4004/say/hello(to='world') +GET http://localhost:4004/odata/v4/say/hello +### + +GET http://localhost:4004/odata/v4/say/hello(to='me') +### diff --git a/test/hello-world.test.js b/test/hello-world.test.js index a68cb88b..1ebdfaf8 100644 --- a/test/hello-world.test.js +++ b/test/hello-world.test.js @@ -5,7 +5,7 @@ describe('cap/samples - Hello world!', () => { const { GET, expect } = cds.test (__dirname+'/../hello') it('should say hello with class impl', async () => { - const {data} = await GET `/say/hello(to='world')` + const {data} = await GET `/odata/v4/say/hello(to='world')` expect(data.value).to.eql('Hello world!') })