1 /* gpgme.js - Javascript integration for gpgme
2 * Copyright (C) 2018 Bundesamt für Sicherheit in der Informationstechnik
4 * This file is part of GPGME.
6 * GPGME is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License as
8 * published by the Free Software Foundation; either version 2.1 of
9 * the License, or (at your option) any later version.
11 * GPGME is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this program; if not, see <http://www.gnu.org/licenses/>.
18 * SPDX-License-Identifier: LGPL-2.1+
21 * Maximilian Krambach <mkrambach@intevation.de>
24 /* global describe, it, expect, Gpgmejs, inputvalues */
26 describe('GPGME context', function (){
27 it('Starting a GpgME instance', function (done){
28 let prm = Gpgmejs.init({ timeout: 2000 });
29 const input = inputvalues.someInputParameter;
32 expect(context).to.be.an('object');
33 expect(context.encrypt).to.be.a('function');
34 expect(context.decrypt).to.be.a('function');
35 expect(context.sign).to.be.a('function');
36 expect(context.verify).to.be.a('function');
37 context.Keyring = input;
38 expect(context.Keyring).to.be.an('object');
39 expect(context.Keyring).to.not.equal(input);
40 expect(context.Keyring.getKeys).to.be.a('function');
41 expect(context.Keyring.getDefaultKey).to.be.a('function');
42 expect(context.Keyring.importKey).to.be.a('function');
43 expect(context.Keyring.generateKey).to.be.a('function');