aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorfrankiebee <frankie.diamond@gmail.com>2018-04-06 02:28:25 +0800
committerfrankiebee <frankie.diamond@gmail.com>2018-04-06 02:28:25 +0800
commit4efc718074a819c15beceece5e0f08b49c8b60bb (patch)
treeea7d107daa61a22b93599c1a923abdd1436f1434 /test
parent1153120fe84e9d4cde47a7e416028be0fec3c61c (diff)
downloadtangerine-wallet-browser-4efc718074a819c15beceece5e0f08b49c8b60bb.tar.gz
tangerine-wallet-browser-4efc718074a819c15beceece5e0f08b49c8b60bb.tar.zst
tangerine-wallet-browser-4efc718074a819c15beceece5e0f08b49c8b60bb.zip
make migration-24 compat with first-time-state
Diffstat (limited to 'test')
-rw-r--r--test/unit/migrations/024-test.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/unit/migrations/024-test.js b/test/unit/migrations/024-test.js
index dab77d4e4..c3c03d06b 100644
--- a/test/unit/migrations/024-test.js
+++ b/test/unit/migrations/024-test.js
@@ -1,5 +1,9 @@
const assert = require('assert')
const migration24 = require('../../../app/scripts/migrations/024')
+const firstTimeState = {
+ meta: {},
+ data: require('../../../app/scripts/first-time-state'),
+}
const properTime = (new Date()).getTime()
const storage = {
"meta": {},
@@ -34,4 +38,12 @@ describe('storage is migrated successfully and the txParams.from are lowercase',
done()
}).catch(done)
})
+
+ it('should migrate first time state', (done) => {
+ migration24.migrate(firstTimeState)
+ .then((migratedData) => {
+ assert.equal(migratedData.meta.version, 24)
+ done()
+ }).catch(done)
+ })
})