Ivan - Fix mocha unit testing [skip ci]
This commit is contained in:
parent
96fe51d08a
commit
8952c1b7e1
|
@ -16,6 +16,10 @@ describe('App component', function () {
|
|||
app.context = {
|
||||
router: {
|
||||
push: stub()
|
||||
},
|
||||
|
||||
location: {
|
||||
pathname: 'MOCK_PATH'
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -23,9 +27,10 @@ describe('App component', function () {
|
|||
});
|
||||
|
||||
it('should update with i18n', function () {
|
||||
app.context.router.push.reset();
|
||||
app.forceUpdate.reset();
|
||||
app.onCommonStoreChanged('i18n');
|
||||
expect(app.forceUpdate).to.have.been.called;
|
||||
expect(app.context.router.push).to.have.been.calledWith('MOCK_PATH');
|
||||
});
|
||||
|
||||
it('should redirect when logged in', function () {
|
||||
|
|
|
@ -62,7 +62,7 @@ describe('Login/Recover Widget', function () {
|
|||
it('should add error if login fails', function () {
|
||||
component.refs.loginForm.refs.password.focus.reset();
|
||||
component.onUserStoreChanged('LOGIN_FAIL');
|
||||
expect(loginForm.props.errors).to.deep.equal({password: 'Password does not match'});
|
||||
expect(loginForm.props.errors).to.deep.equal({password: 'Invalid password'});
|
||||
expect(component.refs.loginForm.refs.password.focus).to.have.been.called;
|
||||
});
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
}
|
||||
|
||||
&_info {
|
||||
background-color: #a2e1ff;
|
||||
background-color: #ceefff;
|
||||
|
||||
.message__icon {
|
||||
color: #4c80ff;
|
||||
|
|
Loading…
Reference in New Issue