Tests: Start auth actions

stable/1.0.x
Alex Gleason 2020-06-09 18:29:55 -05:00
rodzic 6ee3d77e55
commit 9fa7f7bf0f
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 20 dodań i 0 usunięć

Wyświetl plik

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