|
|
@ -1,13 +1,11 @@
|
|
|
|
import reducer from '../compose';
|
|
|
|
import reducer from '../compose';
|
|
|
|
import { Map as ImmutableMap } from 'immutable';
|
|
|
|
import { Map as ImmutableMap } from 'immutable';
|
|
|
|
//import { COMPOSE_REPLY } from 'soapbox/actions/compose';
|
|
|
|
|
|
|
|
import { ME_FETCH_SUCCESS, ME_PATCH_SUCCESS } from 'soapbox/actions/me';
|
|
|
|
import { ME_FETCH_SUCCESS, ME_PATCH_SUCCESS } from 'soapbox/actions/me';
|
|
|
|
import { SETTING_CHANGE } from 'soapbox/actions/settings';
|
|
|
|
import { SETTING_CHANGE } from 'soapbox/actions/settings';
|
|
|
|
import * as actions from 'soapbox/actions/compose';
|
|
|
|
import * as actions from 'soapbox/actions/compose';
|
|
|
|
import { STORE_HYDRATE } from 'soapbox/actions/store';
|
|
|
|
//import { STORE_HYDRATE } from 'soapbox/actions/store';
|
|
|
|
import { REDRAFT } from 'soapbox/actions/statuses';
|
|
|
|
//import { REDRAFT } from 'soapbox/actions/statuses';
|
|
|
|
import { TIMELINE_DELETE } from 'soapbox/actions/timelines';
|
|
|
|
//import { TIMELINE_DELETE } from 'soapbox/actions/timelines';
|
|
|
|
import uuid from 'soapbox/uuid';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
describe('compose reducer', () => {
|
|
|
|
describe('compose reducer', () => {
|
|
|
|
it('returns the initial state by default', () => {
|
|
|
|
it('returns the initial state by default', () => {
|
|
|
@ -155,18 +153,17 @@ describe('compose reducer', () => {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
it('should handle COMPOSE_UNMOUNT', () => {
|
|
|
|
it('should handle COMPOSE_UNMOUNT', () => {
|
|
|
|
const state = ImmutableMap({ mounted: 1, is_composing: true });
|
|
|
|
const state = ImmutableMap({ mounted: 1});
|
|
|
|
const action = {
|
|
|
|
const action = {
|
|
|
|
type: actions.COMPOSE_UNMOUNT,
|
|
|
|
type: actions.COMPOSE_UNMOUNT,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
expect(reducer(state, action).toJS()).toMatchObject({
|
|
|
|
expect(reducer(state, action).toJS()).toMatchObject({
|
|
|
|
mounted: 0,
|
|
|
|
mounted: 0,
|
|
|
|
is_composing: false,
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
it('should handle COMPOSE_SENSITIVITY_CHANGE, with sensitive icon click to toggle, with spoiler active', () => {
|
|
|
|
it('should handle COMPOSE_SENSITIVITY_CHANGE on Mark Sensitive click, don\'t toggle if spoiler active', () => {
|
|
|
|
const state = ImmutableMap({ spoiler: true, sensitive: true });
|
|
|
|
const state = ImmutableMap({ spoiler: true, sensitive: true});
|
|
|
|
const action = {
|
|
|
|
const action = {
|
|
|
|
type: actions.COMPOSE_SENSITIVITY_CHANGE,
|
|
|
|
type: actions.COMPOSE_SENSITIVITY_CHANGE,
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -175,8 +172,8 @@ describe('compose reducer', () => {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
it('should handle COMPOSE_SENSITIVITY_CHANGE, with sensitive icon click to toggle, with spoiler inactive', () => {
|
|
|
|
it('should handle COMPOSE_SENSITIVITY_CHANGE on Mark Sensitive click, toggle if spoiler inactive', () => {
|
|
|
|
const state = ImmutableMap({ spoiler: false, sensitive: true });
|
|
|
|
const state = ImmutableMap({ spoiler: false, sensitive: true});
|
|
|
|
const action = {
|
|
|
|
const action = {
|
|
|
|
type: actions.COMPOSE_SENSITIVITY_CHANGE,
|
|
|
|
type: actions.COMPOSE_SENSITIVITY_CHANGE,
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -186,7 +183,7 @@ describe('compose reducer', () => {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// it('should handle COMPOSE_SPOILERNESS_CHANGE', () => {
|
|
|
|
// it('should handle COMPOSE_SPOILERNESS_CHANGE', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: actions.COMPOSE_SPOILERNESS_CHANGE,
|
|
|
|
// type: actions.COMPOSE_SPOILERNESS_CHANGE,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
@ -197,7 +194,7 @@ describe('compose reducer', () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// it('should handle COMPOSE_SPOILER_TEXT_CHANGE', () => {
|
|
|
|
// it('should handle COMPOSE_SPOILER_TEXT_CHANGE', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: actions.COMPOSE_SPOILER_TEXT_CHANGE,
|
|
|
|
// type: actions.COMPOSE_SPOILER_TEXT_CHANGE,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
@ -208,7 +205,7 @@ describe('compose reducer', () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// it('should handle COMPOSE_VISIBILITY_CHANGE', () => {
|
|
|
|
// it('should handle COMPOSE_VISIBILITY_CHANGE', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: actions.COMPOSE_VISIBILITY_CHANGE,
|
|
|
|
// type: actions.COMPOSE_VISIBILITY_CHANGE,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
@ -219,7 +216,7 @@ describe('compose reducer', () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// it('should handle COMPOSE_CHANGE', () => {
|
|
|
|
// it('should handle COMPOSE_CHANGE', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: actions.COMPOSE_CHANGE,
|
|
|
|
// type: actions.COMPOSE_CHANGE,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
@ -230,7 +227,7 @@ describe('compose reducer', () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// it('should handle COMPOSE_COMPOSING_CHANGE', () => {
|
|
|
|
// it('should handle COMPOSE_COMPOSING_CHANGE', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: actions.COMPOSE_COMPOSING_CHANGE,
|
|
|
|
// type: actions.COMPOSE_COMPOSING_CHANGE,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
@ -241,7 +238,7 @@ describe('compose reducer', () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// it('should handle COMPOSE_SUBMIT_REQUEST', () => {
|
|
|
|
// it('should handle COMPOSE_SUBMIT_REQUEST', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: actions.COMPOSE_SUBMIT_REQUEST,
|
|
|
|
// type: actions.COMPOSE_SUBMIT_REQUEST,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
@ -252,7 +249,7 @@ describe('compose reducer', () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// it('should handle COMPOSE_UPLOAD_CHANGE_REQUEST', () => {
|
|
|
|
// it('should handle COMPOSE_UPLOAD_CHANGE_REQUEST', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: actions.COMPOSE_UPLOAD_CHANGE_REQUEST,
|
|
|
|
// type: actions.COMPOSE_UPLOAD_CHANGE_REQUEST,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
@ -263,7 +260,7 @@ describe('compose reducer', () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// it('should handle COMPOSE_SUBMIT_SUCCESS', () => {
|
|
|
|
// it('should handle COMPOSE_SUBMIT_SUCCESS', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: actions.COMPOSE_SUBMIT_SUCCESS,
|
|
|
|
// type: actions.COMPOSE_SUBMIT_SUCCESS,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
@ -274,7 +271,7 @@ describe('compose reducer', () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// it('should handle COMPOSE_SUBMIT_FAIL', () => {
|
|
|
|
// it('should handle COMPOSE_SUBMIT_FAIL', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: actions.COMPOSE_SUBMIT_FAIL,
|
|
|
|
// type: actions.COMPOSE_SUBMIT_FAIL,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
@ -285,7 +282,7 @@ describe('compose reducer', () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// it('should handle COMPOSE_UPLOAD_CHANGE_FAIL', () => {
|
|
|
|
// it('should handle COMPOSE_UPLOAD_CHANGE_FAIL', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: actions.COMPOSE_UPLOAD_CHANGE_FAIL,
|
|
|
|
// type: actions.COMPOSE_UPLOAD_CHANGE_FAIL,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
@ -296,7 +293,7 @@ describe('compose reducer', () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// it('should handle COMPOSE_UPLOAD_REQUEST', () => {
|
|
|
|
// it('should handle COMPOSE_UPLOAD_REQUEST', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: actions.COMPOSE_UPLOAD_REQUEST,
|
|
|
|
// type: actions.COMPOSE_UPLOAD_REQUEST,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
@ -307,7 +304,7 @@ describe('compose reducer', () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// it('should handle COMPOSE_UPLOAD_SUCCESS', () => {
|
|
|
|
// it('should handle COMPOSE_UPLOAD_SUCCESS', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: actions.COMPOSE_UPLOAD_SUCCESS,
|
|
|
|
// type: actions.COMPOSE_UPLOAD_SUCCESS,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
@ -318,7 +315,7 @@ describe('compose reducer', () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// it('should handle COMPOSE_UPLOAD_FAIL', () => {
|
|
|
|
// it('should handle COMPOSE_UPLOAD_FAIL', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: actions.COMPOSE_UPLOAD_FAIL,
|
|
|
|
// type: actions.COMPOSE_UPLOAD_FAIL,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
@ -329,7 +326,7 @@ describe('compose reducer', () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// it('should handle COMPOSE_UPLOAD_UNDO', () => {
|
|
|
|
// it('should handle COMPOSE_UPLOAD_UNDO', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: actions.COMPOSE_UPLOAD_UNDO,
|
|
|
|
// type: actions.COMPOSE_UPLOAD_UNDO,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
@ -340,7 +337,7 @@ describe('compose reducer', () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// it('should handle COMPOSE_UPLOAD_PROGRESS', () => {
|
|
|
|
// it('should handle COMPOSE_UPLOAD_PROGRESS', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: actions.COMPOSE_UPLOAD_PROGRESS,
|
|
|
|
// type: actions.COMPOSE_UPLOAD_PROGRESS,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
@ -351,7 +348,7 @@ describe('compose reducer', () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// it('should handle COMPOSE_MENTION', () => {
|
|
|
|
// it('should handle COMPOSE_MENTION', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: actions.COMPOSE_MENTION,
|
|
|
|
// type: actions.COMPOSE_MENTION,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
@ -362,7 +359,7 @@ describe('compose reducer', () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// it('should handle COMPOSE_DIRECT', () => {
|
|
|
|
// it('should handle COMPOSE_DIRECT', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: actions.COMPOSE_DIRECT,
|
|
|
|
// type: actions.COMPOSE_DIRECT,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
@ -373,7 +370,7 @@ describe('compose reducer', () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// it('should handle COMPOSE_SUGGESTIONS_CLEAR', () => {
|
|
|
|
// it('should handle COMPOSE_SUGGESTIONS_CLEAR', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: actions.COMPOSE_SUGGESTIONS_CLEAR,
|
|
|
|
// type: actions.COMPOSE_SUGGESTIONS_CLEAR,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
@ -384,7 +381,7 @@ describe('compose reducer', () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// it('should handle COMPOSE_SUGGESTIONS_READY', () => {
|
|
|
|
// it('should handle COMPOSE_SUGGESTIONS_READY', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: actions.COMPOSE_SUGGESTIONS_READY,
|
|
|
|
// type: actions.COMPOSE_SUGGESTIONS_READY,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
@ -395,7 +392,7 @@ describe('compose reducer', () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// it('should handle COMPOSE_SUGGESTION_SELECT', () => {
|
|
|
|
// it('should handle COMPOSE_SUGGESTION_SELECT', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: actions.COMPOSE_SUGGESTION_SELECT,
|
|
|
|
// type: actions.COMPOSE_SUGGESTION_SELECT,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
@ -406,7 +403,7 @@ describe('compose reducer', () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// it('should handle COMPOSE_SUGGESTION_TAGS_UPDATE', () => {
|
|
|
|
// it('should handle COMPOSE_SUGGESTION_TAGS_UPDATE', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: actions.COMPOSE_SUGGESTION_TAGS_UPDATE,
|
|
|
|
// type: actions.COMPOSE_SUGGESTION_TAGS_UPDATE,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
@ -417,7 +414,7 @@ describe('compose reducer', () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// it('should handle COMPOSE_TAG_HISTORY_UPDATE', () => {
|
|
|
|
// it('should handle COMPOSE_TAG_HISTORY_UPDATE', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: actions.COMPOSE_TAG_HISTORY_UPDATE,
|
|
|
|
// type: actions.COMPOSE_TAG_HISTORY_UPDATE,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
@ -428,7 +425,7 @@ describe('compose reducer', () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// it('should handle TIMELINE_DELETE', () => {
|
|
|
|
// it('should handle TIMELINE_DELETE', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: TIMELINE_DELETE,
|
|
|
|
// type: TIMELINE_DELETE,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
@ -439,7 +436,7 @@ describe('compose reducer', () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// it('should handle COMPOSE_EMOJI_INSERT', () => {
|
|
|
|
// it('should handle COMPOSE_EMOJI_INSERT', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: actions.COMPOSE_EMOJI_INSERT,
|
|
|
|
// type: actions.COMPOSE_EMOJI_INSERT,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
@ -450,7 +447,7 @@ describe('compose reducer', () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// it('should handle COMPOSE_UPLOAD_CHANGE_SUCCESS', () => {
|
|
|
|
// it('should handle COMPOSE_UPLOAD_CHANGE_SUCCESS', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: actions.COMPOSE_UPLOAD_CHANGE_SUCCESS,
|
|
|
|
// type: actions.COMPOSE_UPLOAD_CHANGE_SUCCESS,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
@ -461,7 +458,7 @@ describe('compose reducer', () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// it('should handle REDRAFT', () => {
|
|
|
|
// it('should handle REDRAFT', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: REDRAFT,
|
|
|
|
// type: REDRAFT,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
@ -472,7 +469,7 @@ describe('compose reducer', () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// it('should handle COMPOSE_POLL_ADD', () => {
|
|
|
|
// it('should handle COMPOSE_POLL_ADD', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: actions.COMPOSE_POLL_ADD,
|
|
|
|
// type: actions.COMPOSE_POLL_ADD,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
@ -483,7 +480,7 @@ describe('compose reducer', () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// it('should handle COMPOSE_POLL_REMOVE', () => {
|
|
|
|
// it('should handle COMPOSE_POLL_REMOVE', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: actions.COMPOSE_POLL_REMOVE,
|
|
|
|
// type: actions.COMPOSE_POLL_REMOVE,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
@ -494,7 +491,7 @@ describe('compose reducer', () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// it('should handle COMPOSE_POLL_OPTION_ADD', () => {
|
|
|
|
// it('should handle COMPOSE_POLL_OPTION_ADD', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: actions.COMPOSE_POLL_OPTION_ADD,
|
|
|
|
// type: actions.COMPOSE_POLL_OPTION_ADD,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
@ -505,7 +502,7 @@ describe('compose reducer', () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// it('should handle COMPOSE_POLL_OPTION_CHANGE', () => {
|
|
|
|
// it('should handle COMPOSE_POLL_OPTION_CHANGE', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: actions.COMPOSE_POLL_OPTION_CHANGE,
|
|
|
|
// type: actions.COMPOSE_POLL_OPTION_CHANGE,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
@ -516,7 +513,7 @@ describe('compose reducer', () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// it('should handle COMPOSE_POLL_OPTION_REMOVE', () => {
|
|
|
|
// it('should handle COMPOSE_POLL_OPTION_REMOVE', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: actions.COMPOSE_POLL_OPTION_REMOVE,
|
|
|
|
// type: actions.COMPOSE_POLL_OPTION_REMOVE,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
@ -527,7 +524,7 @@ describe('compose reducer', () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// it('should handle COMPOSE_POLL_SETTINGS_CHANGE', () => {
|
|
|
|
// it('should handle COMPOSE_POLL_SETTINGS_CHANGE', () => {
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public' });
|
|
|
|
// const state = ImmutableMap({ default_privacy: 'public', privacy: 'public'});
|
|
|
|
// const action = {
|
|
|
|
// const action = {
|
|
|
|
// type: actions.COMPOSE_POLL_SETTINGS_CHANGE,
|
|
|
|
// type: actions.COMPOSE_POLL_SETTINGS_CHANGE,
|
|
|
|
// };
|
|
|
|
// };
|
|
|
|