From 51268695f226d561b3ac3c76e0991a0e3b95bc76 Mon Sep 17 00:00:00 2001 From: Paul Kaplan Date: Tue, 13 Jul 2021 14:01:30 -0400 Subject: [PATCH] test(studios): fix failing permissions tests for studios there was a test that mutated global fixture data, causing future tests to fail --- test/unit/redux/studio-permissions.test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/unit/redux/studio-permissions.test.js b/test/unit/redux/studio-permissions.test.js index 5e68693ee..2b409817c 100644 --- a/test/unit/redux/studio-permissions.test.js +++ b/test/unit/redux/studio-permissions.test.js @@ -410,7 +410,7 @@ describe('studio members', () => { ['muted logged in', false] ])('%s: %s', (role, expected) => { setStateByRole(role); - state.studio.owner = 'the creator'; + state.studio = {...state.studio, owner: 'the creator'}; expect(selectCanRemoveManager(state, 'the creator')).toBe(expected); }); }); @@ -421,7 +421,7 @@ describe('studio members', () => { ['admin', false], ['curator', false], ['manager', true], - ['creator', false], + ['creator', true], ['logged in', false], ['unconfirmed', false], ['logged out', false], @@ -483,7 +483,7 @@ describe('studio mute errors', () => { ['logged in', false], ['unconfirmed', false], ['logged out', false], - // ['muted creator', true], // This one fails; not sure why + ['muted creator', true], ['muted manager', true], ['muted curator', false], ['muted logged in', false] @@ -502,7 +502,7 @@ describe('studio mute errors', () => { ['logged in', false], ['unconfirmed', false], ['logged out', false], - // ['muted creator', true], // This one fails; not sure why + ['muted creator', true], ['muted manager', false], ['muted curator', false], ['muted logged in', false]