Skip to content

Commit

Permalink
Code review rework
Browse files Browse the repository at this point in the history
  • Loading branch information
jr01 committed Jan 5, 2021
1 parent ded54d9 commit d9aab76
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit d9aab76

Please sign in to comment.