diff options
author | Clement Ho <clemmakesapps@gmail.com> | 2017-07-20 19:17:34 +0000 |
---|---|---|
committer | Jacob Schatz <jschatz@gitlab.com> | 2017-07-20 19:17:34 +0000 |
commit | 3e89960d4abcc5d793c6c60731bcb07be8ab7282 (patch) | |
tree | e75030442a17ca51ca5c87515fb954eec74a184d /spec | |
parent | 01e029887f23019c7a0d3561ae6660ebcda6f044 (diff) | |
download | gitlab-ce-3e89960d4abcc5d793c6c60731bcb07be8ab7282.tar.gz |
Refactor filtered search dropdown parameters
Diffstat (limited to 'spec')
-rw-r--r-- | spec/javascripts/filtered_search/dropdown_user_spec.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/javascripts/filtered_search/dropdown_user_spec.js b/spec/javascripts/filtered_search/dropdown_user_spec.js index 0132f4b7c93..b3c9bca64cc 100644 --- a/spec/javascripts/filtered_search/dropdown_user_spec.js +++ b/spec/javascripts/filtered_search/dropdown_user_spec.js @@ -12,7 +12,9 @@ describe('Dropdown User', () => { spyOn(gl.DropdownUser.prototype, 'getProjectId').and.callFake(() => {}); spyOn(gl.DropdownUtils, 'getSearchInput').and.callFake(() => {}); - dropdownUser = new gl.DropdownUser(null, null, null, gl.FilteredSearchTokenKeys); + dropdownUser = new gl.DropdownUser({ + tokenKeys: gl.FilteredSearchTokenKeys, + }); }); it('should not return the double quote found in value', () => { @@ -78,7 +80,10 @@ describe('Dropdown User', () => { loadFixtures(fixtureTemplate); authorFilterDropdownElement = document.querySelector('#js-dropdown-author'); const dummyInput = document.createElement('div'); - dropdown = new gl.DropdownUser(null, authorFilterDropdownElement, dummyInput); + dropdown = new gl.DropdownUser({ + dropdown: authorFilterDropdownElement, + input: dummyInput, + }); }); const findCurrentUserElement = () => authorFilterDropdownElement.querySelector('.js-current-user'); |