2018-03-17 20:06:48 +01:00
|
|
|
/* global describe, it */
|
2018-03-17 15:27:37 +01:00
|
|
|
|
2018-03-17 21:39:21 +01:00
|
|
|
import { LegacyWallet } from './class';
|
|
|
|
let assert = require('assert');
|
2018-03-17 15:27:37 +01:00
|
|
|
|
2018-03-17 21:39:21 +01:00
|
|
|
describe('unit - LegacyWallet', function() {
|
2018-03-17 15:27:37 +01:00
|
|
|
it('serialize and unserialize work correctly', () => {
|
2018-03-17 21:39:21 +01:00
|
|
|
let a = new LegacyWallet();
|
|
|
|
a.setLabel('my1');
|
|
|
|
let key = JSON.stringify(a);
|
2018-01-30 23:42:38 +01:00
|
|
|
|
2018-03-17 21:39:21 +01:00
|
|
|
let b = LegacyWallet.fromJson(key);
|
|
|
|
assert(key === JSON.stringify(b));
|
2018-01-30 23:42:38 +01:00
|
|
|
|
2018-03-17 21:39:21 +01:00
|
|
|
assert.equal(key, JSON.stringify(b));
|
|
|
|
});
|
|
|
|
});
|