mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 08:31:23 -05:00
test: fix the new test for studio removeManager edge case
This commit is contained in:
parent
e66a31abd8
commit
0ca3431ec3
1 changed files with 3 additions and 4 deletions
|
@ -186,12 +186,11 @@ describe('removeManager', () => {
|
||||||
const state = store.getState();
|
const state = store.getState();
|
||||||
|
|
||||||
// Manager count should still be updated
|
// Manager count should still be updated
|
||||||
expect(selectStudioManagerCount(state)).toBe(98);
|
expect(selectStudioManagerCount(state)).toBe(2);
|
||||||
// The removed manager isn't the current user, so manager permission should be unchanged
|
// The removed manager isn't the current user, so manager permission should be unchanged
|
||||||
expect(state.studio.manager).toBe(false);
|
expect(state.studio.manager).toBe(true);
|
||||||
// No change to the manager items list
|
// No change to the manager items list
|
||||||
expect(managers.selector(state).items.length).toBe(1);
|
expect(managers.selector(state).items.length).toBe(3);
|
||||||
expect(managers.selector(state).items[0].username).toBe('user1');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('on error, promise rejects without any changing count or list', async () => {
|
test('on error, promise rejects without any changing count or list', async () => {
|
||||||
|
|
Loading…
Reference in a new issue