From 5125d89569cfa2b4fd8e3f168d3ac181353f3f2b Mon Sep 17 00:00:00 2001
From: Albin Henriksson <albhe428@student.liu.se>
Date: Thu, 6 May 2021 19:41:30 +0200
Subject: [PATCH] Fix broken test

---
 client/src/utils/renderSlideIcon.test.tsx | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/client/src/utils/renderSlideIcon.test.tsx b/client/src/utils/renderSlideIcon.test.tsx
index 13aad342..ed82c2ef 100644
--- a/client/src/utils/renderSlideIcon.test.tsx
+++ b/client/src/utils/renderSlideIcon.test.tsx
@@ -1,7 +1,8 @@
 import BuildOutlinedIcon from '@material-ui/icons/BuildOutlined'
+import CheckBoxOutlinedIcon from '@material-ui/icons/CheckBoxOutlined'
 import CreateOutlinedIcon from '@material-ui/icons/CreateOutlined'
-import DnsOutlinedIcon from '@material-ui/icons/DnsOutlined'
 import InfoOutlinedIcon from '@material-ui/icons/InfoOutlined'
+import RadioButtonCheckedIcon from '@material-ui/icons/RadioButtonChecked'
 import { shallow } from 'enzyme'
 import { RichSlide } from '../interfaces/ApiRichModels'
 import { renderSlideIcon } from './renderSlideIcon'
@@ -34,7 +35,18 @@ it('returns DnsOutlinedIcon  correctly ', async () => {
   expect(icon).toBeDefined()
   if (icon) {
     const actualResult = shallow(icon)
-    const expectedResult = shallow(<DnsOutlinedIcon />)
+    const expectedResult = shallow(<CheckBoxOutlinedIcon />)
+    expect(actualResult).toEqual(expectedResult)
+  }
+})
+
+it('returns DnsOutlinedIcon  correctly ', async () => {
+  const testSlide = { questions: [{ id: 5, type_id: 4 }] } as RichSlide
+  const icon = renderSlideIcon(testSlide)
+  expect(icon).toBeDefined()
+  if (icon) {
+    const actualResult = shallow(icon)
+    const expectedResult = shallow(<RadioButtonCheckedIcon />)
     expect(actualResult).toEqual(expectedResult)
   }
 })
-- 
GitLab