Auth: test ME_FETCH_SKIP in reducer
This commit is contained in:
parent
8cc8a465c7
commit
941e101fba
|
@ -8,6 +8,7 @@ import {
|
||||||
VERIFY_CREDENTIALS_FAIL,
|
VERIFY_CREDENTIALS_FAIL,
|
||||||
SWITCH_ACCOUNT,
|
SWITCH_ACCOUNT,
|
||||||
} from 'soapbox/actions/auth';
|
} from 'soapbox/actions/auth';
|
||||||
|
import { ME_FETCH_SKIP } from 'soapbox/actions/me';
|
||||||
|
|
||||||
describe('auth reducer', () => {
|
describe('auth reducer', () => {
|
||||||
it('should return the initial state', () => {
|
it('should return the initial state', () => {
|
||||||
|
@ -250,4 +251,13 @@ describe('auth reducer', () => {
|
||||||
expect(result.get('me')).toEqual('5678');
|
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);
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue