Fix tests

This commit is contained in:
Tankred Hase 2014-06-04 18:38:07 +02:00
parent c89ae65bb7
commit 2592b35e4c
1 changed files with 17 additions and 13 deletions

View File

@ -1167,7 +1167,7 @@ define(function(require) {
});
describe('#decryptBody', function() {
it('should do nothing when the message is not encrypted', function() {
it('should do nothing when the message is not encrypted', function(done) {
var message = {
encrypted: false,
decrypted: true,
@ -1176,10 +1176,10 @@ define(function(require) {
dao.decryptBody({
message: message
});
}, done);
});
it('should do nothing when the message is already decrypted', function() {
it('should do nothing when the message is already decrypted', function(done) {
var message = {
encrypted: true,
decrypted: true,
@ -1188,10 +1188,10 @@ define(function(require) {
dao.decryptBody({
message: message
});
}, done);
});
it('should do nothing when the message has no body', function() {
it('should do nothing when the message has no body', function(done) {
var message = {
encrypted: true,
decrypted: false,
@ -1200,10 +1200,10 @@ define(function(require) {
dao.decryptBody({
message: message
});
}, done);
});
it('should do nothing when the message is decrypting', function() {
it('should do nothing when the message is decrypting', function(done) {
var message = {
encrypted: true,
decrypted: false,
@ -1213,7 +1213,7 @@ define(function(require) {
dao.decryptBody({
message: message
});
}, done);
});
it('decrypt a pgp/mime message', function(done) {
@ -1613,7 +1613,9 @@ define(function(require) {
it('should initialize from disk if offline and not refresh folder', function(done) {
account.online = false;
devicestorageStub.listItems.withArgs('folders').yieldsAsync(null, [[inboxFolder]]);
devicestorageStub.listItems.withArgs('folders').yieldsAsync(null, [
[inboxFolder]
]);
refreshFolderStub.withArgs({
folder: inboxFolder
}).yieldsAsync();
@ -1629,7 +1631,9 @@ define(function(require) {
it('should initialize from disk if offline and refresh folder', function(done) {
account.online = false;
delete inboxFolder.messages;
devicestorageStub.listItems.withArgs('folders').yieldsAsync(null, [[inboxFolder]]);
devicestorageStub.listItems.withArgs('folders').yieldsAsync(null, [
[inboxFolder]
]);
refreshFolderStub.withArgs({
folder: inboxFolder
}).yieldsAsync();