diff options
Diffstat (limited to 'spec/frontend/search/sidebar')
-rw-r--r-- | spec/frontend/search/sidebar/components/archived_filter_spec.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/frontend/search/sidebar/components/archived_filter_spec.js b/spec/frontend/search/sidebar/components/archived_filter_spec.js index eaea731882e..2838cb60fa1 100644 --- a/spec/frontend/search/sidebar/components/archived_filter_spec.js +++ b/spec/frontend/search/sidebar/components/archived_filter_spec.js @@ -53,4 +53,20 @@ describe('ArchivedFilter', () => { expect(findH5().text()).toBe(archivedFilterData.headerLabel); }); }); + + describe.each` + include_archived | checkboxState + ${''} | ${'false'} + ${'false'} | ${'false'} + ${'true'} | ${'true'} + ${'sdfsdf'} | ${'false'} + `('selectedFilter', ({ include_archived, checkboxState }) => { + beforeEach(() => { + createComponent({ urlQuery: { include_archived } }); + }); + + it('renders the component', () => { + expect(findCheckboxFilter().attributes('checked')).toBe(checkboxState); + }); + }); }); |