mirror of
https://github.com/moparisthebest/mail
synced 2025-02-07 02:20:14 -05:00
Fix tests
This commit is contained in:
parent
3bfbf77ac1
commit
1c2f00cddd
@ -90,7 +90,7 @@ define(function(require) {
|
|||||||
}]);
|
}]);
|
||||||
expect(scope.subject).to.equal('');
|
expect(scope.subject).to.equal('');
|
||||||
expect(scope.body).to.equal('');
|
expect(scope.body).to.equal('');
|
||||||
expect(scope.ciphertextPreview).to.equal('');
|
expect(scope.ciphertextPreview).to.equal(undefined);
|
||||||
expect(verifyMock.calledOnce).to.be.true;
|
expect(verifyMock.calledOnce).to.be.true;
|
||||||
|
|
||||||
scope.verify.restore();
|
scope.verify.restore();
|
||||||
@ -112,6 +112,8 @@ define(function(require) {
|
|||||||
references: ['ghi', 'def']
|
references: ['ghi', 'def']
|
||||||
};
|
};
|
||||||
|
|
||||||
|
scope.sendBtnSecure = true;
|
||||||
|
|
||||||
scope.state.writer.write(re);
|
scope.state.writer.write(re);
|
||||||
|
|
||||||
expect(scope.writerTitle).to.equal('Reply');
|
expect(scope.writerTitle).to.equal('Reply');
|
||||||
@ -147,6 +149,8 @@ define(function(require) {
|
|||||||
attachments: [{}]
|
attachments: [{}]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
scope.sendBtnSecure = false;
|
||||||
|
|
||||||
scope.state.writer.write(re, null, true);
|
scope.state.writer.write(re, null, true);
|
||||||
|
|
||||||
expect(scope.writerTitle).to.equal('Forward');
|
expect(scope.writerTitle).to.equal('Forward');
|
||||||
@ -155,7 +159,7 @@ define(function(require) {
|
|||||||
}]);
|
}]);
|
||||||
expect(scope.subject).to.equal('Fwd: ' + subject);
|
expect(scope.subject).to.equal('Fwd: ' + subject);
|
||||||
expect(scope.body).to.contain(body);
|
expect(scope.body).to.contain(body);
|
||||||
expect(scope.ciphertextPreview).to.not.be.empty;
|
expect(scope.ciphertextPreview).to.be.undefined;
|
||||||
expect(verifyMock.called).to.be.true;
|
expect(verifyMock.called).to.be.true;
|
||||||
expect(scope.attachments).to.not.equal(re.attachments); // not the same reference
|
expect(scope.attachments).to.not.equal(re.attachments); // not the same reference
|
||||||
expect(scope.attachments).to.deep.equal(re.attachments); // but the same content
|
expect(scope.attachments).to.deep.equal(re.attachments); // but the same content
|
||||||
|
Loading…
Reference in New Issue
Block a user