2020-06-09 16:29:55 -07:00
|
|
|
import {
|
|
|
|
AUTH_LOGGED_OUT,
|
|
|
|
logOut,
|
|
|
|
} from '../auth';
|
|
|
|
import { ALERT_SHOW } from '../alerts';
|
|
|
|
import { Map as ImmutableMap } from 'immutable';
|
2020-06-09 19:29:50 -07:00
|
|
|
import { mockStore } from 'soapbox/test_helpers';
|
2020-06-09 16:29:55 -07:00
|
|
|
|
|
|
|
describe('logOut()', () => {
|
|
|
|
it('creates expected actions', () => {
|
|
|
|
const expectedActions = [
|
|
|
|
{ type: AUTH_LOGGED_OUT },
|
|
|
|
{ type: ALERT_SHOW, title: 'Successfully logged out.', message: '' },
|
|
|
|
];
|
|
|
|
const store = mockStore(ImmutableMap());
|
|
|
|
|
|
|
|
store.dispatch(logOut());
|
|
|
|
return expect(store.getActions()).toEqual(expectedActions);
|
|
|
|
});
|
|
|
|
});
|