Example #1
0
    it('hideEditPostModal', async () => {
        await Actions.setEditingPost('123', 0, 'test', 'title')(store.dispatch, store.getState);

        await store.dispatch(Actions.hideEditPostModal(), store.getState);

        assert.deepEqual(
            store.getState().views.posts.editingPost,
            {
                show: false
            }
        );
    });
    test('hideEditPostModal', async () => {
        const testStore = await mockStore(initialState);

        await testStore.dispatch(Actions.hideEditPostModal());
        expect(testStore.getActions()).toEqual([{type: ActionTypes.HIDE_EDIT_POST_MODAL}]);
    });