Ghost/ghost/admin/tests/unit/components/gh-editor-test.js
Kevin Ansfield 0cbd7d5c68 Isolate all markdown editor behaviour into gh-editor component
no issue
- move all existing markdown editor behaviour out of the editor controller and isolate it into a single component that can be swapped out
- split the `register/remove` functions of the `shortcuts-route` out into a separate `shortcuts` mixin
2016-01-13 12:01:31 +00:00

35 lines
855 B
JavaScript

/* jshint expr:true */
import {expect} from 'chai';
import {
describeComponent,
it
} from 'ember-mocha';
describeComponent(
'gh-editor',
'Unit: Component: gh-editor',
{
unit: true,
// specify the other units that are required for this test
needs: [
'component:gh-ed-editor',
'component:gh-ed-preview',
'helper:gh-count-words',
'helper:route-action',
'service:notifications'
]
},
function () {
it('renders', function () {
// creates the component instance
let component = this.subject();
expect(component._state).to.equal('preRender');
// renders the component on the page
this.render();
expect(component._state).to.equal('inDOM');
});
}
);