diff --git a/app/components/BookBuilder/Chapter/test/AlignmentBox.spec.js b/app/components/BookBuilder/Chapter/test/AlignmentBox.spec.js new file mode 100644 index 0000000000000000000000000000000000000000..986ca64e48cbcd21f506eaa48306d9187b3b2aa4 --- /dev/null +++ b/app/components/BookBuilder/Chapter/test/AlignmentBox.spec.js @@ -0,0 +1,28 @@ +import React from 'react' +import { shallow } from 'enzyme' +import { shallowToJson } from 'enzyme-to-json' +import sinon from 'sinon' + +import AlignmentBox from '../AlignmentBox' + +const { data } = global.mock +const type = 'front' +const chapters = data.chapters.filter((chapter) => { + return chapter.division === type +}) + +let props = { + chapter: chapters[0], + position: 'left', + update: sinon.spy() +} + +const getWrapper = () => { + return shallow(<AlignmentBox {...props} />) +} + +test('should render correctly', () => { + const wrapper = getWrapper() + const tree = shallowToJson(wrapper) + expect(tree).toMatchSnapshot() +}) \ No newline at end of file