Remove Patron reducer
This commit is contained in:
parent
f46374fdac
commit
a8459ced75
2 changed files with 0 additions and 35 deletions
|
@ -1,33 +0,0 @@
|
||||||
import { Record as ImmutableRecord } from 'immutable';
|
|
||||||
|
|
||||||
import { PATRON_ACCOUNT_FETCH_SUCCESS } from '../../actions/patron';
|
|
||||||
import reducer from '../patron';
|
|
||||||
|
|
||||||
describe('patron reducer', () => {
|
|
||||||
it('should return the initial state', () => {
|
|
||||||
const result = reducer(undefined, {} as any);
|
|
||||||
expect(ImmutableRecord.isRecord(result)).toBe(true);
|
|
||||||
expect(result.instance.url).toBe('');
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('PATRON_ACCOUNT_FETCH_SUCCESS', () => {
|
|
||||||
it('should add the account', () => {
|
|
||||||
const action = {
|
|
||||||
type: PATRON_ACCOUNT_FETCH_SUCCESS,
|
|
||||||
account: {
|
|
||||||
url: 'https://gleasonator.com/users/alex',
|
|
||||||
is_patron: true,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
const result = reducer(undefined, action);
|
|
||||||
|
|
||||||
expect(result.accounts.toJS()).toEqual({
|
|
||||||
'https://gleasonator.com/users/alex': {
|
|
||||||
is_patron: true,
|
|
||||||
url: 'https://gleasonator.com/users/alex',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -45,7 +45,6 @@ import modals from './modals';
|
||||||
import mutes from './mutes';
|
import mutes from './mutes';
|
||||||
import notifications from './notifications';
|
import notifications from './notifications';
|
||||||
import onboarding from './onboarding';
|
import onboarding from './onboarding';
|
||||||
import patron from './patron';
|
|
||||||
import pending_statuses from './pending-statuses';
|
import pending_statuses from './pending-statuses';
|
||||||
import polls from './polls';
|
import polls from './polls';
|
||||||
import profile_hover_card from './profile-hover-card';
|
import profile_hover_card from './profile-hover-card';
|
||||||
|
@ -114,7 +113,6 @@ const reducers = {
|
||||||
mutes,
|
mutes,
|
||||||
notifications,
|
notifications,
|
||||||
onboarding,
|
onboarding,
|
||||||
patron,
|
|
||||||
pending_statuses,
|
pending_statuses,
|
||||||
polls,
|
polls,
|
||||||
profile_hover_card,
|
profile_hover_card,
|
||||||
|
|
Loading…
Reference in a new issue