mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-22 01:22:54 +00:00
refactor: include latest changes from core#145
This commit is contained in:
@@ -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: {},
|
||||
|
||||
Reference in New Issue
Block a user