add tests for emails (wip) and encryption, misc fixes

This commit is contained in:
Matteo Pagliazzi
2015-11-13 17:27:13 +01:00
parent 19ce7c9b53
commit 3b75fe6ade
2 changed files with 109 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
import {
encrypt,
decrypt,
} from '../../../../../website/src/libs/api-v3/encryption';
describe('encryption', () => {
it('can encrypt and decrypt', () => {
let data = 'some secret text';
let encrypted = encrypt(data);
let decrypted = decrypt(encrypted);
expect(encrypted).not.to.equal(data);
expect(data).to.equal(decrypted);
});
});