diff --git a/test/common/AsideMenu.test.js b/test/common/AsideMenu.test.js new file mode 100644 index 00000000..db5e8f71 --- /dev/null +++ b/test/common/AsideMenu.test.js @@ -0,0 +1,25 @@ +import { shallow } from 'enzyme' +import React from 'react' +import AsideMenu from '../../src/common/AsideMenu' + +describe('', () => { + let wrapped; + + beforeEach(() => { + wrapped = shallow(); + }); + afterEach(() => { + wrapped.unmount(); + }); + + it('contains links to selected server', () => { + const links = wrapped.find('NavLink'); + + expect(links).toHaveLength(2); + links.forEach(link => expect(link.prop('to')).toContain('abc123')); + }); + + it('contains a button to delete server', () => { + expect(wrapped.find('DeleteServerButton')).toHaveLength(1); + }); +});