mirror of
https://github.com/moparisthebest/mail
synced 2024-11-26 02:42:17 -05:00
[WO-645] Fix: Credentials are not stored after logout
This commit is contained in:
parent
84ba1e5c44
commit
7a986fc60a
@ -86,7 +86,13 @@ var LoginCtrl = function($scope, $location) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
goTo('/desktop');
|
appController._auth.storeCredentials(function(err) {
|
||||||
|
if (err) {
|
||||||
|
return $scope.onError(err);
|
||||||
|
}
|
||||||
|
|
||||||
|
goTo('/desktop');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -74,6 +74,7 @@ describe('Login Controller unit test', function() {
|
|||||||
emailAddress: emailAddress,
|
emailAddress: emailAddress,
|
||||||
realname: 'asd'
|
realname: 'asd'
|
||||||
});
|
});
|
||||||
|
authStub.storeCredentials.yields();
|
||||||
initStub.yields(null, testKeys);
|
initStub.yields(null, testKeys);
|
||||||
|
|
||||||
emailDaoMock.unlock.withArgs({
|
emailDaoMock.unlock.withArgs({
|
||||||
@ -90,6 +91,7 @@ describe('Login Controller unit test', function() {
|
|||||||
expect(startAppStub.calledOnce).to.be.true;
|
expect(startAppStub.calledOnce).to.be.true;
|
||||||
expect(checkForUpdateStub.calledOnce).to.be.true;
|
expect(checkForUpdateStub.calledOnce).to.be.true;
|
||||||
expect(authStub.getEmailAddress.calledOnce).to.be.true;
|
expect(authStub.getEmailAddress.calledOnce).to.be.true;
|
||||||
|
expect(authStub.storeCredentials.calledOnce).to.be.true;
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
scope = $rootScope.$new();
|
scope = $rootScope.$new();
|
||||||
|
Loading…
Reference in New Issue
Block a user