Skip to content

Commit

Permalink
session api refactor
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr committed Jun 23, 2023
1 parent 2ee80fe commit c1c56c3
Showing 1 changed file with 16 additions and 20 deletions.
36 changes: 16 additions & 20 deletions cypress/e2e/api/UsersApi.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,33 +72,29 @@ describe('The user mention API', function() {
})

const invalidRequestData = { ...requestData }
cy.wrap(() => {
invalidRequestData.body = {
...requestData.body,
sessionToken: 'invalid',
}
})
invalidRequestData.body = {
...requestData.body,
sessionToken: 'invalid',
}
cy.request(invalidRequestData).then(({ status }) => {
expect(status).to.eq(403)
})

cy.wrap(() => {
invalidRequestData.body = {
...requestData.body,
sessionId: 0,
}
})
cy.request(invalidRequestData).then(({ status }) => {
const invalidRequestDataId = { ...requestData }
invalidRequestDataId.body = {
...requestData.body,
sessionId: 0,
}
cy.request(invalidRequestDataId).then(({ status }) => {
expect(status).to.eq(403)
})

cy.wrap(() => {
invalidRequestData.body = {
...requestData.body,
documentId: 0,
}
})
cy.request(invalidRequestData).then(({ status }) => {
const invalidRequestDataDocumentId = { ...requestData }
invalidRequestDataDocumentId.body = {
...requestData.body,
sessionId: 0,
}
cy.request(invalidRequestDataDocumentId).then(({ status }) => {
expect(status).to.eq(403)
})

Expand Down

0 comments on commit c1c56c3

Please sign in to comment.