aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/migrations/033-test.js
diff options
context:
space:
mode:
authorThomas Huang <tmashuang@users.noreply.github.com>2019-04-09 02:35:58 +0800
committerGitHub <noreply@github.com>2019-04-09 02:35:58 +0800
commit8c98e89e617b594d4f0ee54a8437e30201688090 (patch)
treee920376b663e7df57e999935c23a448b71bb279d /test/unit/migrations/033-test.js
parent87f393eb31c5172a246db6be37331f8bed9d096e (diff)
parent79804ec79bda1cffa530743ddb8d299c257092a2 (diff)
downloadtangerine-wallet-browser-8c98e89e617b594d4f0ee54a8437e30201688090.tar.gz
tangerine-wallet-browser-8c98e89e617b594d4f0ee54a8437e30201688090.tar.zst
tangerine-wallet-browser-8c98e89e617b594d4f0ee54a8437e30201688090.zip
Merge pull request #6419 from MetaMask/develop
Merge develop into master
Diffstat (limited to 'test/unit/migrations/033-test.js')
-rw-r--r--test/unit/migrations/033-test.js40
1 files changed, 40 insertions, 0 deletions
diff --git a/test/unit/migrations/033-test.js b/test/unit/migrations/033-test.js
new file mode 100644
index 000000000..b111198fd
--- /dev/null
+++ b/test/unit/migrations/033-test.js
@@ -0,0 +1,40 @@
+const assert = require('assert')
+const migration33 = require('../../../app/scripts/migrations/033')
+
+describe('Migration to delete notice controller', () => {
+ const oldStorage = {
+ 'meta': {},
+ 'data': {
+ 'NoticeController': {
+ 'noticesList': [
+ {
+ id: 0,
+ read: false,
+ date: 'Thu Feb 09 2017',
+ title: 'Terms of Use',
+ body: 'notice body',
+ },
+ {
+ id: 2,
+ read: false,
+ title: 'Privacy Notice',
+ body: 'notice body',
+ },
+ {
+ id: 4,
+ read: false,
+ title: 'Phishing Warning',
+ body: 'notice body',
+ },
+ ],
+ },
+ },
+ }
+
+ it('removes notice controller from state', () => {
+ migration33.migrate(oldStorage)
+ .then(newStorage => {
+ assert.equal(newStorage.data.NoticeController, undefined)
+ })
+ })
+})