diff --git a/app/soapbox/actions/__tests__/auth-test.js b/app/soapbox/actions/__tests__/auth-test.js deleted file mode 100644 index 0e1e3d2b4..000000000 --- a/app/soapbox/actions/__tests__/auth-test.js +++ /dev/null @@ -1,20 +0,0 @@ -import { - AUTH_LOGGED_OUT, - logOut, -} from '../auth'; -import { ALERT_SHOW } from '../alerts'; -import { Map as ImmutableMap } from 'immutable'; -import { mockStore } from 'soapbox/test_helpers'; - -describe('logOut()', () => { - it('creates expected actions', () => { - const expectedActions = [ - { type: AUTH_LOGGED_OUT }, - { type: ALERT_SHOW, message: 'Logged out.', severity: 'success' }, - ]; - const store = mockStore(ImmutableMap()); - - store.dispatch(logOut()); - return expect(store.getActions()).toEqual(expectedActions); - }); -}); diff --git a/app/soapbox/features/auth_login/components/__tests__/__snapshots__/login_page-test.js.snap b/app/soapbox/features/auth_login/components/__tests__/__snapshots__/login_page-test.js.snap index c6cdc64e3..82586223c 100644 --- a/app/soapbox/features/auth_login/components/__tests__/__snapshots__/login_page-test.js.snap +++ b/app/soapbox/features/auth_login/components/__tests__/__snapshots__/login_page-test.js.snap @@ -64,4 +64,66 @@ exports[` renders correctly on load 1`] = ` `; -exports[` renders correctly on load 2`] = `null`; +exports[` renders correctly on load 2`] = ` +
+
+
+
+ +
+
+ +
+

+ + Trouble logging in? + +

+
+
+
+ +
+
+`; diff --git a/app/soapbox/reducers/auth.js b/app/soapbox/reducers/auth.js index a6d1d58cb..5509371bc 100644 --- a/app/soapbox/reducers/auth.js +++ b/app/soapbox/reducers/auth.js @@ -69,6 +69,7 @@ const migrateLegacy = state => { return state.withMutations(state => { const app = fromJS(JSON.parse(localStorage.getItem('soapbox:auth:app'))); const user = fromJS(JSON.parse(localStorage.getItem('soapbox:auth:user'))); + if (!user) return; state.set('me', '_legacy'); // Placeholder account ID state.set('app', app); state.set('tokens', ImmutableMap({