Auth: test ME_FETCH_SKIP in reducer

actually-fix-tabs-bar
Alex Gleason 2021-07-09 16:29:01 -05:00
rodzic 8cc8a465c7
commit 941e101fba
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 10 dodań i 0 usunięć

Wyświetl plik

@ -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);
});
});
});