|
|
@ -10,6 +10,7 @@ import {
|
|
|
|
} from 'soapbox/actions/auth';
|
|
|
|
} from 'soapbox/actions/auth';
|
|
|
|
import { ME_FETCH_SKIP } from 'soapbox/actions/me';
|
|
|
|
import { ME_FETCH_SKIP } from 'soapbox/actions/me';
|
|
|
|
import { MASTODON_PRELOAD_IMPORT } from 'soapbox/actions/preload';
|
|
|
|
import { MASTODON_PRELOAD_IMPORT } from 'soapbox/actions/preload';
|
|
|
|
|
|
|
|
import { buildAccount } from 'soapbox/jest/factory';
|
|
|
|
import { AuthAppRecord, AuthTokenRecord, AuthUserRecord, ReducerRecord } from 'soapbox/reducers/auth';
|
|
|
|
import { AuthAppRecord, AuthTokenRecord, AuthUserRecord, ReducerRecord } from 'soapbox/reducers/auth';
|
|
|
|
|
|
|
|
|
|
|
|
import reducer from '../auth';
|
|
|
|
import reducer from '../auth';
|
|
|
@ -71,7 +72,7 @@ describe('auth reducer', () => {
|
|
|
|
it('deletes the user', () => {
|
|
|
|
it('deletes the user', () => {
|
|
|
|
const action = {
|
|
|
|
const action = {
|
|
|
|
type: AUTH_LOGGED_OUT,
|
|
|
|
type: AUTH_LOGGED_OUT,
|
|
|
|
account: fromJS({ url: 'https://gleasonator.com/users/alex' }),
|
|
|
|
account: buildAccount({ url: 'https://gleasonator.com/users/alex' }),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const state = ReducerRecord({
|
|
|
|
const state = ReducerRecord({
|
|
|
@ -100,7 +101,7 @@ describe('auth reducer', () => {
|
|
|
|
|
|
|
|
|
|
|
|
const action = {
|
|
|
|
const action = {
|
|
|
|
type: AUTH_LOGGED_OUT,
|
|
|
|
type: AUTH_LOGGED_OUT,
|
|
|
|
account: fromJS({ url: 'https://gleasonator.com/users/alex' }),
|
|
|
|
account: buildAccount({ url: 'https://gleasonator.com/users/alex' }),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const result = reducer(state, action);
|
|
|
|
const result = reducer(state, action);
|
|
|
|