Files
habitica/test/api/unit/libs/encryption.test.js
Matteo Pagliazzi 8be9964483 API v4 (WIP) (#10453)
API v4
2018-06-18 14:40:25 +02:00

16 lines
357 B
JavaScript

import {
encrypt,
decrypt,
} from '../../../../website/server/libs/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);
});
});