|
|
@ -55,6 +55,12 @@ describe('IMPORT_ACTIVITIES_PARAMETERS', () => { |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
describe('SEARCH_ASSET_PROFILES_PARAMETERS', () => { |
|
|
describe('SEARCH_ASSET_PROFILES_PARAMETERS', () => { |
|
|
|
|
|
it('Refuses a query that contains only spaces', () => { |
|
|
|
|
|
expect( |
|
|
|
|
|
SEARCH_ASSET_PROFILES_PARAMETERS.safeParse({ query: ' ' }).success |
|
|
|
|
|
).toBe(false); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
it(`Refuses a query shorter than ${SEARCH_QUERY_MINIMUM_LENGTH} characters`, () => { |
|
|
it(`Refuses a query shorter than ${SEARCH_QUERY_MINIMUM_LENGTH} characters`, () => { |
|
|
expect( |
|
|
expect( |
|
|
SEARCH_ASSET_PROFILES_PARAMETERS.safeParse({ query: 'A' }).success |
|
|
SEARCH_ASSET_PROFILES_PARAMETERS.safeParse({ query: 'A' }).success |
|
|
@ -76,4 +82,10 @@ describe('SEARCH_ASSET_PROFILES_PARAMETERS', () => { |
|
|
).toBe(true); |
|
|
).toBe(true); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
it('Removes spaces at the start and the end of a query', () => { |
|
|
|
|
|
expect( |
|
|
|
|
|
SEARCH_ASSET_PROFILES_PARAMETERS.parse({ query: ' Apple ' }).query |
|
|
|
|
|
).toBe('Apple'); |
|
|
|
|
|
}); |
|
|
}); |
|
|
}); |
|
|
|