refactor: include latest changes from core#145

This commit is contained in:
Rainer Killinger
2022-01-21 15:30:23 +01:00
parent 482dec345c
commit 9d8fe643a5
13 changed files with 316 additions and 260 deletions

View File

@@ -50,7 +50,7 @@ describe('Search route', async function () {
describe('Basic POST /search', async function() {
it('should accept empty JSON object', async function () {
const {status} = await testApp
.post(searchRoute.urlFragment)
.post(searchRoute.urlPath)
.set('Accept', 'application/json')
.send({});
@@ -59,7 +59,7 @@ describe('Search route', async function () {
it('should accept valid search request', async function () {
const {status} = await testApp
.post(searchRoute.urlFragment)
.post(searchRoute.urlPath)
.set('Accept', 'application/json')
.send({
query: 'Some search terms'
@@ -70,7 +70,7 @@ describe('Search route', async function () {
it('should respond with bad request on invalid search request (body)', async function () {
const {status} = await testApp
.post(searchRoute.urlFragment)
.post(searchRoute.urlPath)
.set('Content-Type', 'application/json')
.set('Accept', 'application/json')
.send({
@@ -84,7 +84,7 @@ describe('Search route', async function () {
describe('Basic POST /multi/search', async function() {
it('should respond with bad request on invalid search request (empty JSON object as body)', async function () {
const {status} = await testApp
.post(multiSearchRoute.urlFragment)
.post(multiSearchRoute.urlPath)
.set('Accept', 'application/json')
.send({});
@@ -93,7 +93,7 @@ describe('Search route', async function () {
it('should accept valid search request', async function () {
const {status} = await testApp
.post(multiSearchRoute.urlFragment)
.post(multiSearchRoute.urlPath)
.set('Accept', 'application/json')
.send({
one: { query: 'Some search terms for one search'},
@@ -108,7 +108,7 @@ describe('Search route', async function () {
sandbox.stub(configFile.backend, 'maxMultiSearchRouteQueries').value(2);
const {status} = await testApp
.post(multiSearchRoute.urlFragment)
.post(multiSearchRoute.urlPath)
.set('Content-Type', 'application/json')
.send({
one: {},