diff options
Diffstat (limited to 'spec/frontend/filtered_search')
-rw-r--r-- | spec/frontend/filtered_search/droplab/plugins/ajax_filter_spec.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/frontend/filtered_search/droplab/plugins/ajax_filter_spec.js b/spec/frontend/filtered_search/droplab/plugins/ajax_filter_spec.js index 212b9ffc8f9..c958f669f9a 100644 --- a/spec/frontend/filtered_search/droplab/plugins/ajax_filter_spec.js +++ b/spec/frontend/filtered_search/droplab/plugins/ajax_filter_spec.js @@ -10,6 +10,9 @@ describe('AjaxFilter', () => { dummyConfig = { endpoint: 'dummy endpoint', searchKey: 'dummy search key', + searchValueFunction() { + return 'test'; + }, }; dummyList = { data: [], @@ -40,7 +43,7 @@ describe('AjaxFilter', () => { it('calls onLoadingFinished after loading data', async () => { ajaxSpy = (url) => { - expect(url).toBe('dummy endpoint?dummy search key='); + expect(url).toBe('dummy endpoint?dummy%20search%20key=test'); return Promise.resolve(dummyData); }; @@ -51,7 +54,7 @@ describe('AjaxFilter', () => { it('does not call onLoadingFinished if Ajax call fails', async () => { const dummyError = new Error('My dummy is sick! :-('); ajaxSpy = (url) => { - expect(url).toBe('dummy endpoint?dummy search key='); + expect(url).toBe('dummy endpoint?dummy%20search%20key=test'); return Promise.reject(dummyError); }; |