aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/migrations-test.js
diff options
context:
space:
mode:
authorDan Finlay <flyswatter@users.noreply.github.com>2017-03-25 05:02:07 +0800
committerGitHub <noreply@github.com>2017-03-25 05:02:07 +0800
commitc45ed395a69dd6a753976f4b612d40d0f3da8407 (patch)
tree706ad96992d46095aadfcb8bdf4a7d1d6c0c5bbc /test/unit/migrations-test.js
parent393c7faf28bd94f16c16427f33d830b3b7241538 (diff)
parent3a888ede2adbab8cea19edef16a013af276837f1 (diff)
downloadtangerine-wallet-browser-c45ed395a69dd6a753976f4b612d40d0f3da8407.tar.gz
tangerine-wallet-browser-c45ed395a69dd6a753976f4b612d40d0f3da8407.tar.zst
tangerine-wallet-browser-c45ed395a69dd6a753976f4b612d40d0f3da8407.zip
Merge pull request #1250 from MetaMask/notice-modification
Erase notice body when read
Diffstat (limited to 'test/unit/migrations-test.js')
-rw-r--r--test/unit/migrations-test.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/unit/migrations-test.js b/test/unit/migrations-test.js
index d2a83be77..ccd1477b0 100644
--- a/test/unit/migrations-test.js
+++ b/test/unit/migrations-test.js
@@ -15,6 +15,8 @@ const migration8 = require(path.join('..', '..', 'app', 'scripts', 'migrations',
const migration9 = require(path.join('..', '..', 'app', 'scripts', 'migrations', '009'))
const migration10 = require(path.join('..', '..', 'app', 'scripts', 'migrations', '010'))
const migration11 = require(path.join('..', '..', 'app', 'scripts', 'migrations', '011'))
+const migration12 = require(path.join('..', '..', 'app', 'scripts', 'migrations', '012'))
+
const oldTestRpc = 'https://rawtestrpc.metamask.io/'
const newTestRpc = 'https://testrpc.metamask.io/'
@@ -91,6 +93,11 @@ describe('wallet1 is migrated successfully', () => {
}).then((eleventhResult) => {
assert.equal(eleventhResult.data.isDisclaimerConfirmed, null, 'isDisclaimerConfirmed should not exist')
assert.equal(eleventhResult.data.TOSHash, null, 'TOSHash should not exist')
+
+ return migration12.migrate(eleventhResult)
+ }).then((twelfthResult) => {
+ assert.equal(twelfthResult.data.NoticeController.noticesList[0].body, '', 'notices that have been read should have an empty body.')
+ assert.equal(twelfthResult.data.NoticeController.noticesList[1].body, 'nonempty', 'notices that have not been read should not have an empty body.')
})
})