diff options
Diffstat (limited to 'test/integration/lib/encryptor-test.js')
-rw-r--r-- | test/integration/lib/encryptor-test.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/integration/lib/encryptor-test.js b/test/integration/lib/encryptor-test.js new file mode 100644 index 000000000..21d6ee6f7 --- /dev/null +++ b/test/integration/lib/encryptor-test.js @@ -0,0 +1,17 @@ +var encryptor = require('../../../app/scripts/lib/encryptor') + +QUnit.test('encryptor', function(assert) { + var password, data, encrypted + + password = 'a sample passw0rd' + data = { foo: 'data to encrypt' } + + encryptor.encrypt(password, data) + .then(function(result) { + assert.equal(typeof result, 'string', 'returns a string') + }) + .catch(function(reason) { + assert.ifError(reason, 'threw an error') + }) + +}) |