You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
421 B
18 lines
421 B
8 years ago
|
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')
|
||
|
})
|
||
|
|
||
|
})
|