Files
habitica/test/api/v3/unit/libs/encryption.test.js
Matteo Pagliazzi 60f34dafb0 Deprecate API v2 (was Revert "Revert "Deprecate API v2"") (#7802)
* Revert "Revert "Deprecate API v2""

* fix path in shops controller
2016-08-01 22:36:10 +02:00

16 lines
360 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);
});
});