aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/migrations
diff options
context:
space:
mode:
authorThomas Huang <tmashuang@users.noreply.github.com>2019-04-02 09:03:54 +0800
committerWhymarrh Whitby <whymarrh.whitby@gmail.com>2019-04-02 09:03:54 +0800
commita46ec83c9b258a3aed65e1ef08769300c01ca13b (patch)
treea48f7ddb8635ffbb024ff755d1865686c8a0ab27 /test/unit/migrations
parent4055dc3475cb743e540766a8a8c704bb2b807502 (diff)
downloadtangerine-wallet-browser-a46ec83c9b258a3aed65e1ef08769300c01ca13b.tar.gz
tangerine-wallet-browser-a46ec83c9b258a3aed65e1ef08769300c01ca13b.tar.zst
tangerine-wallet-browser-a46ec83c9b258a3aed65e1ef08769300c01ca13b.zip
Remove NoticeController (#6382)
Diffstat (limited to 'test/unit/migrations')
-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)
+ })
+ })
+})