2021-02-04 19:15:23 +01:00
|
|
|
import assert from 'assert';
|
2021-03-16 22:00:08 +01:00
|
|
|
import migration33 from './033';
|
2019-04-02 03:03:54 +02:00
|
|
|
|
2020-02-11 17:51:13 +01:00
|
|
|
describe('Migration to delete notice controller', function () {
|
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',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
2019-04-02 03:03:54 +02:00
|
|
|
|
2020-02-11 17:51:13 +01:00
|
|
|
it('removes notice controller from state', function () {
|
2020-11-03 00:41:28 +01:00
|
|
|
migration33.migrate(oldStorage).then((newStorage) => {
|
2021-02-04 19:15:23 +01:00
|
|
|
assert.equal(newStorage.data.NoticeController, undefined);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|