From c774a00610f5e8719186843028895c84071ef844 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Thu, 1 Nov 2018 12:43:48 +0100 Subject: [PATCH] Created ShortUrls test --- test/short-urls/ShortUrls.test.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 test/short-urls/ShortUrls.test.js diff --git a/test/short-urls/ShortUrls.test.js b/test/short-urls/ShortUrls.test.js new file mode 100644 index 00000000..9cccc9e9 --- /dev/null +++ b/test/short-urls/ShortUrls.test.js @@ -0,0 +1,26 @@ +import React from 'react'; +import { shallow } from 'enzyme'; +import { ShortUrlsComponent as ShortUrls } from '../../src/short-urls/ShortUrls'; +import Paginator from '../../src/short-urls/Paginator'; +import ShortUrlsList from '../../src/short-urls/ShortUrlsList'; +import SearchBar from '../../src/short-urls/SearchBar'; + +describe('', () => { + let wrapper; + + beforeEach(() => { + const params = { + serverId: '1', + page: '1', + }; + + wrapper = shallow(); + }); + afterEach(() => wrapper.unmount()); + + it('wraps a SearchBar, ShortUrlsList as Paginator', () => { + expect(wrapper.find(SearchBar)).toHaveLength(1); + expect(wrapper.find(ShortUrlsList)).toHaveLength(1); + expect(wrapper.find(Paginator)).toHaveLength(1); + }); +});