From 6093b2a111da616b0f9b9c0ec290225ba46cb0c6 Mon Sep 17 00:00:00 2001 From: Simon Knox Date: Thu, 18 Jan 2018 00:14:51 +1100 Subject: [PATCH] add test for search terms with + --- spec/javascripts/boards/utils/query_data_spec.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/spec/javascripts/boards/utils/query_data_spec.js b/spec/javascripts/boards/utils/query_data_spec.js index a8866ac6af4..cb6c2b345cd 100644 --- a/spec/javascripts/boards/utils/query_data_spec.js +++ b/spec/javascripts/boards/utils/query_data_spec.js @@ -11,11 +11,18 @@ describe('queryData', () => { }); it('parses path for milestone with trailing +', () => { - const path = 'milestone_title=A%2B'; expect( - queryData(path, {}), + 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', + }); + }); });