From 941e101fba2f8d3d4f861140c182a885401d8998 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 9 Jul 2021 16:29:01 -0500 Subject: [PATCH] Auth: test ME_FETCH_SKIP in reducer --- app/soapbox/reducers/__tests__/auth-test.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/soapbox/reducers/__tests__/auth-test.js b/app/soapbox/reducers/__tests__/auth-test.js index a149042c4..77a9b1965 100644 --- a/app/soapbox/reducers/__tests__/auth-test.js +++ b/app/soapbox/reducers/__tests__/auth-test.js @@ -8,6 +8,7 @@ import { VERIFY_CREDENTIALS_FAIL, SWITCH_ACCOUNT, } from 'soapbox/actions/auth'; +import { ME_FETCH_SKIP } from 'soapbox/actions/me'; describe('auth reducer', () => { it('should return the initial state', () => { @@ -250,4 +251,13 @@ describe('auth reducer', () => { expect(result.get('me')).toEqual('5678'); }); }); + + describe('ME_FETCH_SKIP', () => { + it('sets `me` to null', () => { + const state = fromJS({ me: '1234' }); + const action = { type: ME_FETCH_SKIP }; + const result = reducer(state, action); + expect(result.get('me')).toEqual(null); + }); + }); });