From 9b666115408b1c81dc958b25573c8ff1f2f35ad3 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 28 Jul 2020 10:50:51 -0500 Subject: [PATCH] Revert "Merge branch 'patch-1' into 'develop'" This reverts commit 20bfeb1db6cfc20a2d5a305d5c392c3dcf1e60e2, reversing changes made to 475881e80bb69cff2f3512987460b00de146453c. --- app/soapbox/reducers/__tests__/compose-test.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/app/soapbox/reducers/__tests__/compose-test.js b/app/soapbox/reducers/__tests__/compose-test.js index c3ebe7ded..d5306aa33 100644 --- a/app/soapbox/reducers/__tests__/compose-test.js +++ b/app/soapbox/reducers/__tests__/compose-test.js @@ -168,8 +168,20 @@ describe('compose reducer', () => { }); }); + //Remove this test once spoiler is decoupled from marking media as sensitive + it('should handle COMPOSE_SENSITIVITY_CHANGE on Mark Sensitive click, don\'t toggle if spoiler active', () => { + const state = ImmutableMap({ spoiler: true, sensitive: true, idempotencyKey: null }); + const action = { + type: actions.COMPOSE_SENSITIVITY_CHANGE, + }; + expect(reducer(state, action).toJS()).toMatchObject({ + sensitive: true, + }); + }); + + //Edit this test to not pass spoiler state once spoiler is decoupled from marking media as sensitive it('should handle COMPOSE_SENSITIVITY_CHANGE on Mark Sensitive click, toggle if spoiler inactive', () => { - const state = ImmutableMap({ sensitive: true }); + const state = ImmutableMap({ spoiler: false, sensitive: true }); const action = { type: actions.COMPOSE_SENSITIVITY_CHANGE, };