diff --git a/test/integration/main.js b/test/integration/main.js index f0703f35..96bb4085 100644 --- a/test/integration/main.js +++ b/test/integration/main.js @@ -4,7 +4,7 @@ require.config({ baseUrl: './', paths: { - openpgp: '../../resources/openpgp.min' + openpgp: '../../resources/openpgp' }, shim: { openpgp: { diff --git a/test/integration/pgp-test.js b/test/integration/pgp-test.js index 1b115f2e..0dc09dfc 100644 --- a/test/integration/pgp-test.js +++ b/test/integration/pgp-test.js @@ -132,7 +132,7 @@ define(function(require) { }); }); - describe('Encrypt', function() { + describe('Encrypt and Sign', function() { it('should work', function(done) { pgp.encrypt(message, [pubkey], function(err, ct) { expect(err).to.not.exist; @@ -143,11 +143,12 @@ define(function(require) { }); }); - describe('Decrypt', function() { + describe('Decrypt and verify', function() { it('should work', function(done) { pgp.decrypt(ciphertext, pubkey, function(err, pt) { expect(err).to.not.exist; - expect(pt).to.equal(message); + expect(pt.text).to.equal(message); + expect(pt.validSignatures[0]).to.be.true; done(); }); }); diff --git a/test/integration/pgp.js b/test/integration/pgp.js index 8640e189..bfbbf1cd 100644 --- a/test/integration/pgp.js +++ b/test/integration/pgp.js @@ -160,7 +160,7 @@ define(function(require) { } if (keymat !== null) { var decrypted = msg.decryptAndVerifySignature(keymat, sesskey, senderKey); - callback(null, decrypted.text); + callback(null, decrypted); } else { callback({