diff options
author | Maximilian Krambach <[email protected]> | 2018-08-17 17:20:35 +0000 |
---|---|---|
committer | Maximilian Krambach <[email protected]> | 2018-08-17 17:20:35 +0000 |
commit | 74684f24c663af12c88b196fecd5f44863b893e4 (patch) | |
tree | 59647232f7ea09a7fc7b22f3e3bde4cdc74e78a5 /lang/js/BrowserTestExtension/tests/KeyInfos.js | |
parent | js: correct decrypt result info (2) (diff) | |
download | gpgme-74684f24c663af12c88b196fecd5f44863b893e4.tar.gz gpgme-74684f24c663af12c88b196fecd5f44863b893e4.zip |
js: decode arriving gpg message strings
--
* Arriving strings (i.e. user id names, error messages) are not
always in javascript encoding. This is an attempt to go through
the whole gpgme answer (with the exception of payload data) and
to fix the encoding of these
Diffstat (limited to '')
-rw-r--r-- | lang/js/BrowserTestExtension/tests/KeyInfos.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lang/js/BrowserTestExtension/tests/KeyInfos.js b/lang/js/BrowserTestExtension/tests/KeyInfos.js index 03773a44..1829f227 100644 --- a/lang/js/BrowserTestExtension/tests/KeyInfos.js +++ b/lang/js/BrowserTestExtension/tests/KeyInfos.js @@ -22,7 +22,7 @@ */ /* global describe, it, expect, before, Gpgmejs */ -/* global inputvalues, fixedLengthString */ +/* global inputvalues*/ describe('Key information', function () { let context = null; @@ -43,4 +43,15 @@ describe('Key information', function () { done(); }); }); + + it('A userId keeps their encoding', function(done){ + context.Keyring.importKey(inputvalues.publicKeyNonAscii.key, true) + .then(function(result){ + expect(result.Keys[0]).to.be.an('object'); + const user = result.Keys[0].key.get('userids')[0]; + expect(user.get('name')).to.equal( + inputvalues.publicKeyNonAscii.userid); + done(); + }); + }); });
\ No newline at end of file |