mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-05-31 14:11:58 +05:30
Create app namespace for all absolute requires of app modules. Move all packages under packages yarn workspace
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import React from 'react';
|
||||
import expect from 'app/test/unexpected';
|
||||
import sinon from 'sinon';
|
||||
|
||||
import { shallow } from 'enzyme';
|
||||
|
||||
import ChangePassword from 'app/components/profile/changePassword/ChangePassword';
|
||||
|
||||
describe('<ChangePassword />', () => {
|
||||
it('renders two <Input /> components', () => {
|
||||
const component = shallow(<ChangePassword onSubmit={() => {}} />);
|
||||
|
||||
expect(component.find('Input'), 'to satisfy', { length: 2 });
|
||||
});
|
||||
|
||||
it('should call onSubmit if passwords entered', () => {
|
||||
const onSubmit = sinon.spy(() => ({ catch: () => {} })).named('onSubmit');
|
||||
const component = shallow(<ChangePassword onSubmit={onSubmit} />);
|
||||
|
||||
component.find('Form').simulate('submit');
|
||||
|
||||
expect(onSubmit, 'was called');
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user