From bedda108c0138282f34cf5d13a8514674f0c9854 Mon Sep 17 00:00:00 2001
From: Alexandros Georgantas <alexgeorg86@gmail.com>
Date: Thu, 30 Mar 2017 11:14:40 +0300
Subject: [PATCH] Addeded render test for AlignmentBox

---
 .../Chapter/test/AlignmentBox.spec.js         | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 app/components/BookBuilder/Chapter/test/AlignmentBox.spec.js

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 0000000..986ca64
--- /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
-- 
GitLab