add unit test coverage for TowerLogo.jsx

This commit is contained in:
Jake McDermott
2019-01-07 07:30:58 -05:00
parent 4936238344
commit 8756da59fa
4 changed files with 21 additions and 31 deletions

View File

@@ -108,17 +108,6 @@ describe('<App />', () => {
});
});
test('onLogoClick sets selected nav back to defaults', () => {
const appWrapper = shallow(<App />);
appWrapper.setState({ activeGroup: 'foo', activeItem: 'bar' });
expect(appWrapper.state().activeItem).toBe('bar');
expect(appWrapper.state().activeGroup).toBe('foo');
appWrapper.instance().onLogoClick();
expect(appWrapper.state().activeGroup).toBe(DEFAULT_ACTIVE_GROUP);
});
test('onLogout makes expected call to api client', async (done) => {
const logout = jest.fn(() => Promise.resolve());
const api = { logout };