Tests: Start auth actions
This commit is contained in:
parent
6ee3d77e55
commit
9fa7f7bf0f
1 changed files with 20 additions and 0 deletions
20
app/soapbox/actions/__tests__/auth-test.js
Normal file
20
app/soapbox/actions/__tests__/auth-test.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
import {
|
||||
AUTH_LOGGED_OUT,
|
||||
logOut,
|
||||
} from '../auth';
|
||||
import { ALERT_SHOW } from '../alerts';
|
||||
import { Map as ImmutableMap } from 'immutable';
|
||||
import { mockStore } from 'soapbox/test_setup';
|
||||
|
||||
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);
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue