Skip to content

Commit

Permalink
Update odata.test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
smahati authored Nov 5, 2024
1 parent 7c28da3 commit 67fcee2
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions test/odata.test.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
const cds = require('@sap/cds/lib')
const { GET, POST, PATCH, axios, expect } = cds.test(__dirname+'/..')
const EDIT = (url) => POST (url+'/TravelService.draftEdit',{})
const SAVE = (url) => POST (url+'/TravelService.draftActivate')
axios.defaults.headers['content-type'] = 'application/json;IEEE754Compatible=true' // REVISIT: can be removed when @sap/cds 5.1.5 is released?
axios.defaults.auth = { username: 'alice', password: 'admin' }

describe ("Basic Querying", () => {

const { GET, POST, PATCH, axios, expect } = cds.test(__dirname+'/..')

Check failure on line 4 in test/odata.test.js

View workflow job for this annotation

GitHub Actions / build (20.x)

'GET' is assigned a value but never used

Check failure on line 4 in test/odata.test.js

View workflow job for this annotation

GitHub Actions / build (20.x)

'POST' is assigned a value but never used

Check failure on line 4 in test/odata.test.js

View workflow job for this annotation

GitHub Actions / build (20.x)

'PATCH' is assigned a value but never used

Check failure on line 4 in test/odata.test.js

View workflow job for this annotation

GitHub Actions / build (18.x)

'GET' is assigned a value but never used

Check failure on line 4 in test/odata.test.js

View workflow job for this annotation

GitHub Actions / build (18.x)

'POST' is assigned a value but never used

Check failure on line 4 in test/odata.test.js

View workflow job for this annotation

GitHub Actions / build (18.x)

'PATCH' is assigned a value but never used
axios.defaults.headers['content-type'] = 'application/json;IEEE754Compatible=true' // REVISIT: can be removed when @sap/cds 5.1.5 is released?
axios.defaults.auth = { username: 'alice', password: 'admin' }


it ("should read from row references", async()=>{
const TravelRef = {ref:[{
id:'TravelService.Travel',
Expand Down Expand Up @@ -42,6 +41,11 @@ describe ("Basic Querying", () => {

describe('Basic OData', () => {

const { GET, POST, PATCH, axios, expect } = cds.test(__dirname+'/..')
axios.defaults.headers['content-type'] = 'application/json;IEEE754Compatible=true' // REVISIT: can be removed when @sap/cds 5.1.5 is released?
axios.defaults.auth = { username: 'alice', password: 'admin' }
const EDIT = (url) => POST (url+'/TravelService.draftEdit',{})
const SAVE = (url) => POST (url+'/TravelService.draftActivate')
it('serves $metadata documents in v4', async () => {
const { headers, status, data } = await GET `/processor/$metadata`
expect(status).to.equal(200)
Expand Down

0 comments on commit 67fcee2

Please sign in to comment.