Add feature user-admin
Change-Id: Idcdc718ee502fd803a96409e67109cdac5b8b806
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import { DefaultPage } from '../../../src/features/user-admin/DefaultPage';
|
||||
|
||||
describe('user-admin/DefaultPage', () => {
|
||||
it('renders node with correct class name', () => {
|
||||
const props = {
|
||||
userAdmin: {},
|
||||
actions: {},
|
||||
};
|
||||
const renderedComponent = shallow(
|
||||
<DefaultPage {...props} />
|
||||
);
|
||||
|
||||
expect(
|
||||
renderedComponent.find('.user-admin-default-page').length
|
||||
).toBe(1);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,14 @@
|
||||
import reducer from '../../../../src/features/user-admin/redux/reducer';
|
||||
|
||||
describe('user-admin/redux/reducer', () => {
|
||||
it('does nothing if no matched action', () => {
|
||||
const prevState = {};
|
||||
const state = reducer(
|
||||
prevState,
|
||||
{ type: '__UNKNOWN_ACTION_TYPE__' }
|
||||
);
|
||||
expect(state).toBe(prevState);
|
||||
});
|
||||
|
||||
// TODO: add global reducer test if needed.
|
||||
});
|
||||
Reference in New Issue
Block a user