mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 17:12:43 +00:00
refactor: include latest changes from core#145
This commit is contained in:
@@ -44,7 +44,7 @@ describe('Bulk routes', async function () {
|
||||
|
||||
it('should create bulk', async function () {
|
||||
const {status, body, error} = await testApp
|
||||
.post(bulkRoute.urlFragment)
|
||||
.post(bulkRoute.urlPath)
|
||||
.set('Content-Type', 'application/json')
|
||||
.send(request);
|
||||
|
||||
@@ -56,13 +56,13 @@ describe('Bulk routes', async function () {
|
||||
|
||||
it('should return (throw) error if a bulk with the provided UID cannot be found when adding to a bulk', async function () {
|
||||
await testApp
|
||||
.post(bulkRoute.urlFragment)
|
||||
.post(bulkRoute.urlPath)
|
||||
.set('Content-Type', 'application/json')
|
||||
.send(request);
|
||||
const bulkAddRouteUrlFragment = bulkAddRoute.urlFragment.toLocaleLowerCase().replace(':uid', 'a-wrong-uid');
|
||||
const bulkAddRouteurlPath = bulkAddRoute.urlPath.toLocaleLowerCase().replace(':uid', 'a-wrong-uid');
|
||||
|
||||
const {status} = await testApp
|
||||
.post(bulkAddRouteUrlFragment)
|
||||
.post(bulkAddRouteurlPath)
|
||||
.set('Content-Type', 'application/json')
|
||||
.send(book);
|
||||
|
||||
@@ -71,13 +71,13 @@ describe('Bulk routes', async function () {
|
||||
|
||||
it('should add to a created bulk', async function () {
|
||||
const response = await testApp
|
||||
.post(bulkRoute.urlFragment)
|
||||
.post(bulkRoute.urlPath)
|
||||
.set('Content-Type', 'application/json')
|
||||
.send(request);
|
||||
const bulkAddRouteUrlFragment = bulkAddRoute.urlFragment.toLocaleLowerCase().replace(':uid', response.body.uid);
|
||||
const bulkAddRouteurlPath = bulkAddRoute.urlPath.toLocaleLowerCase().replace(':uid', response.body.uid);
|
||||
|
||||
const {status, body} = await testApp
|
||||
.post(bulkAddRouteUrlFragment)
|
||||
.post(bulkAddRouteurlPath)
|
||||
.set('Content-Type', 'application/json')
|
||||
.send(book);
|
||||
|
||||
@@ -87,13 +87,13 @@ describe('Bulk routes', async function () {
|
||||
|
||||
it('should return (throw) error if a bulk with the provided UID cannot be found when closing a bulk (done)', async function () {
|
||||
await testApp
|
||||
.post(bulkRoute.urlFragment)
|
||||
.post(bulkRoute.urlPath)
|
||||
.set('Content-Type', 'application/json')
|
||||
.send(request);
|
||||
const bulkDoneRouteUrlFragment = bulkDoneRoute.urlFragment.toLocaleLowerCase().replace(':uid', 'a-wrong-uid');
|
||||
const bulkDoneRouteurlPath = bulkDoneRoute.urlPath.toLocaleLowerCase().replace(':uid', 'a-wrong-uid');
|
||||
|
||||
const {status} = await testApp
|
||||
.post(bulkDoneRouteUrlFragment)
|
||||
.post(bulkDoneRouteurlPath)
|
||||
.set('Content-Type', 'application/json')
|
||||
.send({});
|
||||
|
||||
@@ -102,13 +102,13 @@ describe('Bulk routes', async function () {
|
||||
|
||||
it ('should close the bulk (done)', async function () {
|
||||
const response = await testApp
|
||||
.post(bulkRoute.urlFragment)
|
||||
.post(bulkRoute.urlPath)
|
||||
.set('Content-Type', 'application/json')
|
||||
.send(request);
|
||||
const bulkDoneRouteUrlFragment = bulkDoneRoute.urlFragment.toLocaleLowerCase().replace(':uid', response.body.uid);
|
||||
const bulkDoneRouteurlPath = bulkDoneRoute.urlPath.toLocaleLowerCase().replace(':uid', response.body.uid);
|
||||
|
||||
const response2 = await testApp
|
||||
.post(bulkDoneRouteUrlFragment)
|
||||
.post(bulkDoneRouteurlPath)
|
||||
.set('Content-Type', 'application/json')
|
||||
.send({});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user