Home Reference Source

application/__tests__/components/common/rich-editor/editor-test.js

jest.unmock('./../../../../components/common/rich-editor/embed');

jest.mock('react-codemirror');

import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';
import Immutable from 'immutable';
import sinon from 'sinon';
import AltTestingUtils from 'alt-utils/lib/AltTestingUtils';

import Embed from './../../../../components/common/rich-editor/embed';

describe('EmbedEditorComponent', () => {

    beforeEach(() => {
        jasmine.clock().uninstall();
        jasmine.clock().install();
    });

    afterEach(() => {
        jasmine.clock().uninstall();
    })

    it('loads default state', () => {
        const el = TestUtils.renderIntoDocument(<Embed />);
        el.componentWillMount();

        expect(el.state.editMode).toEqual(true);
    });
});