mirror of
https://github.com/moparisthebest/mail
synced 2025-02-16 15:10:10 -05:00
fix wrong api usage in login initial controller
This commit is contained in:
parent
9a8e6ff3dd
commit
f3ef8fdf91
@ -35,7 +35,9 @@ define(function(require) {
|
||||
|
||||
$scope.setState(states.PROCESSING);
|
||||
setTimeout(function() {
|
||||
emailDao.unlock({}, passphrase, function(err) {
|
||||
emailDao.unlock({
|
||||
passphrase: passphrase
|
||||
}, function(err) {
|
||||
if (err) {
|
||||
$scope.setState(states.IDLE);
|
||||
$scope.onError(err);
|
||||
|
@ -67,7 +67,9 @@ define(function(require) {
|
||||
it('should unlock crypto', function(done) {
|
||||
scope.state.passphrase = passphrase;
|
||||
scope.state.confirmation = passphrase;
|
||||
emailDaoMock.unlock.withArgs({}, passphrase).yields();
|
||||
emailDaoMock.unlock.withArgs({
|
||||
passphrase: passphrase
|
||||
}).yields();
|
||||
setStateStub = sinon.stub(scope, 'setState', function(state) {
|
||||
if (setStateStub.calledOnce) {
|
||||
expect(state).to.equal(2);
|
||||
@ -92,7 +94,9 @@ define(function(require) {
|
||||
it('should not work when keypair generation fails', function(done) {
|
||||
scope.state.passphrase = passphrase;
|
||||
scope.state.confirmation = passphrase;
|
||||
emailDaoMock.unlock.withArgs({}, passphrase).yields(new Error('asd'));
|
||||
emailDaoMock.unlock.withArgs({
|
||||
passphrase: passphrase
|
||||
}).yields(new Error('asd'));
|
||||
setStateStub = sinon.stub(scope, 'setState', function(state) {
|
||||
if (setStateStub.calledOnce) {
|
||||
expect(state).to.equal(2);
|
||||
|
Loading…
Reference in New Issue
Block a user