Ivan - Fix mocha unit testing [skip ci]

This commit is contained in:
ivan 2016-08-01 13:48:55 -03:00
parent 96fe51d08a
commit 8952c1b7e1
3 changed files with 8 additions and 3 deletions

View File

@ -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 () {

View File

@ -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;
});

View File

@ -53,7 +53,7 @@
}
&_info {
background-color: #a2e1ff;
background-color: #ceefff;
.message__icon {
color: #4c80ff;