28 lines
624 B
JavaScript
28 lines
624 B
JavaScript
import queryData from '~/boards/utils/query_data';
|
|
|
|
describe('queryData', () => {
|
|
it('parses path for label with trailing +', () => {
|
|
const path = 'label_name[]=label%2B';
|
|
expect(
|
|
queryData(path, {}),
|
|
).toEqual({
|
|
label_name: ['label+'],
|
|
});
|
|
});
|
|
|
|
it('parses path for milestone with trailing +', () => {
|
|
expect(
|
|
queryData('milestone_title=A%2B', {}),
|
|
).toEqual({
|
|
milestone_title: 'A+',
|
|
});
|
|
});
|
|
|
|
it('parses path for search terms with spaces', () => {
|
|
expect(
|
|
queryData('search=two+words', {}),
|
|
).toEqual({
|
|
search: 'two words',
|
|
});
|
|
});
|
|
});
|