Merge pull request 'Fixed the test issue' (#18) from fix/search into develop
Reviewed-on: http://85.143.176.51:3000/free-land/backend/pulls/18
This commit is contained in:
commit
3022eaa0a3
@ -1,7 +1,5 @@
|
|||||||
import { ApiExtraModels, ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
import { ApiExtraModels, ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
||||||
import { IsArray, IsDefined, IsInt, IsObject, IsOptional } from "class-validator";
|
import { IsDefined, IsInt, IsObject, IsOptional } from "class-validator";
|
||||||
import { EsPit } from "../../interfaces/elastic/es-pit.interface";
|
|
||||||
import { EsQuery } from "../../interfaces/elastic/es-query.interface"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of allowed properties in this DTO
|
* List of allowed properties in this DTO
|
||||||
|
@ -107,13 +107,16 @@ describe('Unit tests for SearchService', () => {
|
|||||||
expect(httpGetSpy).toHaveBeenCalledWith<[string, object]>(expect.anything(), {
|
expect(httpGetSpy).toHaveBeenCalledWith<[string, object]>(expect.anything(), {
|
||||||
data: {
|
data: {
|
||||||
query: {
|
query: {
|
||||||
query_string: {
|
multi_match: {
|
||||||
query: 'keyword',
|
query: query.query,
|
||||||
default_field: 'content',
|
fields: [
|
||||||
|
'title',
|
||||||
|
'content'
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
from: 32,
|
from: query.offset,
|
||||||
size: 1,
|
size: query.limit
|
||||||
},
|
},
|
||||||
headers: { 'Content-Type': 'application/json' }
|
headers: { 'Content-Type': 'application/json' }
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user