2020-06-09 18:08:07 -07:00
|
|
|
import { Map as ImmutableMap } from 'immutable';
|
2022-01-10 14:25:06 -08:00
|
|
|
|
2022-01-10 14:01:24 -08:00
|
|
|
import reducer from '../accounts_counters';
|
2020-07-14 12:05:05 -07:00
|
|
|
// import { ACCOUNT_FOLLOW_SUCCESS, ACCOUNT_UNFOLLOW_SUCCESS } from 'soapbox/actions/accounts';
|
|
|
|
// import relationship from 'soapbox/__fixtures__/relationship.json';
|
|
|
|
// import accounts_counter_initial from 'soapbox/__fixtures__/accounts_counter_initial.json';
|
|
|
|
// import accounts_counter_unfollow from 'soapbox/__fixtures__/accounts_counter_unfollow.json';
|
|
|
|
// import accounts_counter_follow from 'soapbox/__fixtures__/accounts_counter_follow.json';
|
2020-07-14 05:43:56 -07:00
|
|
|
|
2020-06-09 18:08:07 -07:00
|
|
|
|
|
|
|
describe('accounts_counters reducer', () => {
|
|
|
|
it('should return the initial state', () => {
|
|
|
|
expect(reducer(undefined, {})).toEqual(ImmutableMap());
|
|
|
|
});
|
2020-07-14 05:43:56 -07:00
|
|
|
|
2020-07-14 12:05:05 -07:00
|
|
|
// it('should handle ACCOUNT_FOLLOW_SUCCESS', () => {
|
|
|
|
// const state = ImmutableList([accounts_counter_initial]);
|
|
|
|
// const action = {
|
|
|
|
// type: ACCOUNT_FOLLOW_SUCCESS,
|
|
|
|
// relationship: relationship,
|
|
|
|
// alreadyFollowing: false,
|
|
|
|
// };
|
|
|
|
// expect(reducer(state, action)).toEqual(
|
|
|
|
// ImmutableList([ accounts_counter_follow ]));
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
// it('should handle ACCOUNT_UNFOLLOW_SUCCESS', () => {
|
|
|
|
// const state = ImmutableList([accounts_counter_initial]);
|
|
|
|
// const action = {
|
|
|
|
// type: ACCOUNT_UNFOLLOW_SUCCESS,
|
|
|
|
// relationship: relationship,
|
|
|
|
// alreadyFollowing: true,
|
|
|
|
// };
|
|
|
|
// expect(reducer(state, action)).toEqual(
|
|
|
|
// ImmutableList([accounts_counter_unfollow]));
|
|
|
|
// });
|
2020-07-14 05:43:56 -07:00
|
|
|
|
2020-06-09 18:08:07 -07:00
|
|
|
});
|