mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #646 from ryanxcharles/bug/fix-getEncryptedObj-test
fix getEncryptedObj test
This commit is contained in:
commit
fd7eaca46a
|
@ -12,12 +12,11 @@
|
||||||
<script src="../node_modules/chai/chai.js"></script>
|
<script src="../node_modules/chai/chai.js"></script>
|
||||||
<script src="../lib/crypto-js/rollups/aes.js"></script>
|
<script src="../lib/crypto-js/rollups/aes.js"></script>
|
||||||
<script>mocha.setup('bdd')</script>
|
<script>mocha.setup('bdd')</script>
|
||||||
<script src="../lib/bitcore.js"></script>
|
<script src="../lib/bitcore/browser/bundle.js"></script>
|
||||||
<script src="../js/copayBundle.js"></script>
|
<script src="../js/copayBundle.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var copay = require('copay');
|
var copay = require('copay');
|
||||||
</script>
|
</script>
|
||||||
<script src="test.API.js"></script>
|
|
||||||
<script src="test.blockchain.Insight.js"></script>
|
<script src="test.blockchain.Insight.js"></script>
|
||||||
<script src="test.performance.js"></script>
|
<script src="test.performance.js"></script>
|
||||||
<script src="test.PrivateKey.js"></script>
|
<script src="test.PrivateKey.js"></script>
|
||||||
|
|
|
@ -46,13 +46,13 @@ if (typeof process === 'undefined' || !process.version) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('#getEncryptedObj', function() {
|
describe('#export', function() {
|
||||||
it('should encrypt the wallet', function() {
|
it('should export the encrypted wallet', function() {
|
||||||
localStorage.clear();
|
localStorage.clear();
|
||||||
var storage = new LocalEncrypted({password: 'password'});
|
var storage = new LocalEncrypted({password: 'password'});
|
||||||
storage.set('walletId', 'test', 'testval');
|
storage.set('walletId', 'test', 'testval');
|
||||||
var obj = {test:'testval'};
|
var obj = {test:'testval'};
|
||||||
var encrypted = storage.getEncryptedObj('walletId');
|
var encrypted = storage.export(obj);
|
||||||
encrypted.length.should.be.greaterThan(10);
|
encrypted.length.should.be.greaterThan(10);
|
||||||
//encrypted.slice(0,6).should.equal("53616c");
|
//encrypted.slice(0,6).should.equal("53616c");
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue