From 3201ded91f91fcdf501ad966380b6ff29d798b09 Mon Sep 17 00:00:00 2001 From: Maximilian Krambach Date: Thu, 30 Aug 2018 15:00:19 +0200 Subject: js: add tests -- * BrowserTestExtension/tests: - decryptTest.js: Check Decryption and return values of binary data - encryptTest.js: Return data type of armored/non-armored encryption - added a small encoded input png for testing * DemoExtension/maindemo.js: Fixed unexpected usage of the Demo encrypt (non-armored) --- lang/js/DemoExtension/maindemo.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lang/js/DemoExtension/maindemo.js') diff --git a/lang/js/DemoExtension/maindemo.js b/lang/js/DemoExtension/maindemo.js index b472bcc8..c992e7e1 100644 --- a/lang/js/DemoExtension/maindemo.js +++ b/lang/js/DemoExtension/maindemo.js @@ -29,8 +29,8 @@ document.addEventListener('DOMContentLoaded', function () { function (){ let data = document.getElementById('inputtext').value; let keyId = document.getElementById('pubkey').value; - gpgmejs.encrypt({ data: data, publicKeys: keyId, armor:false }).then( - function (answer){ + gpgmejs.encrypt({ data: data, publicKeys: keyId, armor: true }) + .then(function (answer){ if (answer.data){ document.getElementById( 'answer').value = answer.data; -- cgit v1.2.3