1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-12 12:47:14 +01:00
metamask-extension/app/scripts/migrations/033.test.js

38 lines
870 B
JavaScript
Raw Normal View History

import migration33 from './033';
2019-04-02 03:03:54 +02:00
describe('Migration to delete notice controller', () => {
2019-04-02 03:03:54 +02:00
const oldStorage = {
2020-11-03 00:41:28 +01:00
meta: {},
data: {
NoticeController: {
noticesList: [
2019-04-02 03:03:54 +02:00
{
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',
},
],
},
},
};
2019-04-02 03:03:54 +02:00
it('removes notice controller from state', async () => {
const newStorage = await migration33.migrate(oldStorage);
expect(newStorage.data.NoticeController).toBeUndefined();
});
});