From 087039f5609fa7d66df737cfce70a0178608ee36 Mon Sep 17 00:00:00 2001 From: Damien Laureaux Date: Mon, 25 Feb 2019 05:30:15 +0000 Subject: [PATCH] Add test for secretController (WIP) --- test/controllers.secretController.spec.js | 36 +++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 test/controllers.secretController.spec.js diff --git a/test/controllers.secretController.spec.js b/test/controllers.secretController.spec.js new file mode 100644 index 00000000..ce3b5e52 --- /dev/null +++ b/test/controllers.secretController.spec.js @@ -0,0 +1,36 @@ +/* eslint-disable max-len */ +const { expect } = require('chai'); +const secretController = require('../src/controllers/secretController'); +// const testData = require('./testData.json'); + +// const addSecretRequest = { +// body: { +// id: testData.id, +// encryption_key: testData.encryptionKey, +// value: testData.secret, +// }, +// }; + +// async function addSecret(req) { +// return Promise.resolve(secretController.addSecret(req)); +// } + +// Add Secret +describe('Add Secret', () => { + it('expect the "addSecret" to exists and be a function', (done) => { + expect(typeof (secretController.addSecret)).to.be.equals('function'); + done(); + }); + // it('expect the "addSecret" function to return an object', async () => { + // const addSecretResponse = await addSecret(addSecretRequest); + // expect(addSecretResponse).to.be.a('object'); + // }); +}); + + +describe('Get Secrets', () => { + it('expect the "getSecrets" to exists and be a function', (done) => { + expect(typeof (secretController.getSecrets)).to.be.equals('function'); + done(); + }); +});