diff --git a/src/modules/Search/SearchCategory.js b/src/modules/Search/SearchCategory.js index f56d3e4f15..dcf27decb4 100644 --- a/src/modules/Search/SearchCategory.js +++ b/src/modules/Search/SearchCategory.js @@ -19,7 +19,7 @@ function SearchCategory(props) { return (
{renderer(props)}
- {childrenUtils.isNil(children) ? content : children} +
{childrenUtils.isNil(children) ? content : children}
) } diff --git a/test/specs/modules/Search/SearchCategory-test.js b/test/specs/modules/Search/SearchCategory-test.js index 7060fdd471..129f1c634a 100644 --- a/test/specs/modules/Search/SearchCategory-test.js +++ b/test/specs/modules/Search/SearchCategory-test.js @@ -1,7 +1,23 @@ +import React from 'react' + import SearchCategory from 'src/modules/Search/SearchCategory' import * as common from 'test/specs/commonTests' describe('SearchCategory', () => { common.isConformant(SearchCategory) common.rendersChildren(SearchCategory) + + describe('children', () => { + it('should be a child with a "name" className', () => { + shallow() + .childAt(0) + .should.have.className('name') + }) + + it('should be wrapped with a "results" className', () => { + shallow() + .childAt(1) + .should.have.className('results') + }) + }) })