1
0
mirror of https://github.com/moparisthebest/mail synced 2024-11-22 08:52:15 -05:00

[WO-645] Fix: Credentials are not stored after logout

This commit is contained in:
Felix Hammerl 2014-10-20 17:42:46 +02:00
parent 84ba1e5c44
commit 7a986fc60a
2 changed files with 9 additions and 1 deletions

View File

@ -86,7 +86,13 @@ var LoginCtrl = function($scope, $location) {
return;
}
goTo('/desktop');
appController._auth.storeCredentials(function(err) {
if (err) {
return $scope.onError(err);
}
goTo('/desktop');
});
});
}
}

View File

@ -74,6 +74,7 @@ describe('Login Controller unit test', function() {
emailAddress: emailAddress,
realname: 'asd'
});
authStub.storeCredentials.yields();
initStub.yields(null, testKeys);
emailDaoMock.unlock.withArgs({
@ -90,6 +91,7 @@ describe('Login Controller unit test', function() {
expect(startAppStub.calledOnce).to.be.true;
expect(checkForUpdateStub.calledOnce).to.be.true;
expect(authStub.getEmailAddress.calledOnce).to.be.true;
expect(authStub.storeCredentials.calledOnce).to.be.true;
done();
});
scope = $rootScope.$new();