diff options
| author | tusooa <tusooa@kazv.moe> | 2022-08-30 00:14:30 +0000 |
|---|---|---|
| committer | tusooa <tusooa@kazv.moe> | 2022-08-30 00:14:30 +0000 |
| commit | 8b25febe36a97d113c846928dab22ab36158ee07 (patch) | |
| tree | f6f63b05e4bbc9d17258a4a559a2dc1970bbf047 /test/unit/specs/modules/lists.spec.js | |
| parent | 3b6c31f3b3d2326ffbe258c826f6dbd3f5374cf2 (diff) | |
| parent | dbb6f224425e059e2edc6018d0b009cc87a0aea4 (diff) | |
Merge branch 'navigation-update' into 'develop'
Navigation update + preferences storage (and some minor fixes)
See merge request pleroma/pleroma-fe!1592
Diffstat (limited to 'test/unit/specs/modules/lists.spec.js')
| -rw-r--r-- | test/unit/specs/modules/lists.spec.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/unit/specs/modules/lists.spec.js b/test/unit/specs/modules/lists.spec.js index ac9af1b6..e43106ea 100644 --- a/test/unit/specs/modules/lists.spec.js +++ b/test/unit/specs/modules/lists.spec.js @@ -17,13 +17,13 @@ describe('The lists module', () => { const list = { id: '1', title: 'testList' } const modList = { id: '1', title: 'anotherTestTitle' } - mutations.setList(state, list) - expect(state.allListsObject[list.id]).to.eql({ title: list.title }) + mutations.setList(state, { listId: list.id, title: list.title }) + expect(state.allListsObject[list.id]).to.eql({ title: list.title, accountIds: [] }) expect(state.allLists).to.have.length(1) expect(state.allLists[0]).to.eql(list) - mutations.setList(state, modList) - expect(state.allListsObject[modList.id]).to.eql({ title: modList.title }) + mutations.setList(state, { listId: modList.id, title: modList.title }) + expect(state.allListsObject[modList.id]).to.eql({ title: modList.title, accountIds: [] }) expect(state.allLists).to.have.length(1) expect(state.allLists[0]).to.eql(modList) }) @@ -33,10 +33,10 @@ describe('The lists module', () => { const list = { id: '1', accountIds: ['1', '2', '3'] } const modList = { id: '1', accountIds: ['3', '4', '5'] } - mutations.setListAccounts(state, list) + mutations.setListAccounts(state, { listId: list.id, accountIds: list.accountIds }) expect(state.allListsObject[list.id]).to.eql({ accountIds: list.accountIds }) - mutations.setListAccounts(state, modList) + mutations.setListAccounts(state, { listId: modList.id, accountIds: modList.accountIds }) expect(state.allListsObject[modList.id]).to.eql({ accountIds: modList.accountIds }) }) @@ -47,9 +47,9 @@ describe('The lists module', () => { 1: { title: 'testList', accountIds: ['1', '2', '3'] } } } - const id = '1' + const listId = '1' - mutations.deleteList(state, { id }) + mutations.deleteList(state, { listId }) expect(state.allLists).to.have.length(0) expect(state.allListsObject).to.eql({}) }) |
