aboutsummaryrefslogtreecommitdiffstats
path: root/test/integration/lib/encryptor-test.js
blob: 21d6ee6f7a09f7e6b2d5ff72745820c31dc365c2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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')
  })

})