mirror of
https://github.com/moparisthebest/mail
synced 2024-11-26 10:52:17 -05:00
[WO-645] Fix: Credentials are not stored after logout
This commit is contained in:
parent
84ba1e5c44
commit
7a986fc60a
@ -86,8 +86,14 @@ var LoginCtrl = function($scope, $location) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
appController._auth.storeCredentials(function(err) {
|
||||||
|
if (err) {
|
||||||
|
return $scope.onError(err);
|
||||||
|
}
|
||||||
|
|
||||||
goTo('/desktop');
|
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