sforkowany z mirror/soapbox
Auth: test ME_FETCH_SKIP in reducer
rodzic
8cc8a465c7
commit
941e101fba
|
@ -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);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Ładowanie…
Reference in New Issue