Fixed tests

This commit is contained in:
Alejandro Celaya 2018-08-20 16:44:46 +02:00
parent 2b373cc4af
commit e0c1e13d1e

View file

@ -2,6 +2,7 @@ import { identity } from 'ramda';
import React from 'react';
import { ServersDropdown } from '../../src/servers/ServersDropdown';
import { shallow } from 'enzyme';
import { DropdownItem, DropdownToggle } from 'reactstrap';
describe('<ServersDropdown />', () => {
let wrapped;
@ -13,10 +14,10 @@ describe('<ServersDropdown />', () => {
afterEach(() => wrapped.unmount());
it('contains the list of servers', () => {
expect(wrapped.find('DropdownItem').length).toEqual(servers.length);
expect(wrapped.find(DropdownItem).length).toEqual(servers.length + 2);
});
it('contains a toggle with proper title', () => {
expect(wrapped.find('DropdownToggle').length).toEqual(1);
expect(wrapped.find(DropdownToggle).length).toEqual(1);
});
});