mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 15:12:58 +03:00
0cbd7d5c68
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
35 lines
855 B
JavaScript
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');
|
|
});
|
|
}
|
|
);
|