diff --git a/src/app/modules/angular-slickgrid/services/__tests__/grid-odata.service.spec.ts b/src/app/modules/angular-slickgrid/services/__tests__/grid-odata.service.spec.ts index 330ebdb44..27fad64ab 100644 --- a/src/app/modules/angular-slickgrid/services/__tests__/grid-odata.service.spec.ts +++ b/src/app/modules/angular-slickgrid/services/__tests__/grid-odata.service.spec.ts @@ -1610,7 +1610,7 @@ describe('GridOdataService', () => { expect(query).toBe(expectation); }); - it('should return a query to filter a search value with a number that contains invalid characters', () => { + it('should return a query without invalid characters to filter a search value with a number that contains invalid characters', () => { const expectation = `$filter=(Duration eq -22)`; const mockColumnDuration = { id: 'duration', field: 'duration', type: FieldType.number } as Column; const mockColumnFilters = { @@ -1624,9 +1624,9 @@ describe('GridOdataService', () => { expect(query).toBe(expectation); }); - it('should return a query to filter a search value with an integer that contains invalid characters', () => { + it('should return a query without invalid characters to filter a search value with an integer that contains invalid characters', () => { const expectation = `$filter=(Duration eq 22)`; - const mockColumnDuration = { id: 'duration', field: 'duration', type: FieldType.number } as Column; + const mockColumnDuration = { id: 'duration', field: 'duration', type: FieldType.integer } as Column; const mockColumnFilters = { duration: { columnId: 'duration', columnDef: mockColumnDuration, searchTerms: ['22;'] }, } as ColumnFilters; @@ -1638,9 +1638,9 @@ describe('GridOdataService', () => { expect(query).toBe(expectation); }); - it('should return a query to filter a search value with a number that only has a minus characters', () => { + it('should return a query with 0 to filter a search value when the search value contains a minus', () => { const expectation = `$filter=(Duration eq 0)`; - const mockColumnDuration = { id: 'duration', field: 'duration', type: FieldType.number } as Column; + const mockColumnDuration = { id: 'duration', field: 'duration', type: FieldType.float } as Column; const mockColumnFilters = { duration: { columnId: 'duration', columnDef: mockColumnDuration, searchTerms: ['-'] }, } as ColumnFilters;