1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-26 12:29:06 +01:00
metamask-extension/test/unit/migrations/033-test.js

41 lines
955 B
JavaScript
Raw Normal View History

import assert from 'assert'
import migration33 from '../../../app/scripts/migrations/033'
2019-04-02 03:03:54 +02:00
describe('Migration to delete notice controller', function () {
2019-04-02 03:03:54 +02:00
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', function () {
2019-04-02 03:03:54 +02:00
migration33.migrate(oldStorage)
2020-02-15 21:34:12 +01:00
.then((newStorage) => {
2019-04-02 03:03:54 +02:00
assert.equal(newStorage.data.NoticeController, undefined)
})
})
})