mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-05 09:50:34 +03:00
506b2a9388
requires https://github.com/TryGhost/Ghost/pull/9277 - added a `koenigEditor` feature flag - modified the feature service to accept a `developer` boolean on the options object passed into the internal `feature` method, if `true` the feature flag won't be enabled unless the `enableDeveloperExperiments` config option is also enabled - added "developer feature testing" section in labs that's only visible if `enableDeveloperExperiments` config flag is enabled - added koenig editor toggle to the developer section in labs - enabled a switch between the markdown and koenig editors - modified the default value of the `mobiledoc` attr in the Post model to be a blank mobiledoc or blank markdown mobiledoc depending on the feature flag - modified the `autofocus` switch in editor controller's `setPost` method so that it is always switched, even for new->edit where the post model isn't swapped - added a compatibility check to the editor controller's `setPost` method that shows an alert and force enables the koenig editor if the koenig flag is not enabled and the opened post is not compatible with the markdown editor - fixed various issues that have appeared due to the old koenig alpha becoming out of sync with master
34 lines
931 B
JavaScript
34 lines
931 B
JavaScript
import {describe, it} from 'mocha';
|
|
import {expect} from 'chai';
|
|
import {setupModelTest} from 'ember-mocha';
|
|
|
|
describe('Unit: Serializer: post', function () {
|
|
setupModelTest('post', {
|
|
// Specify the other units that are required for this test.
|
|
needs: [
|
|
'transform:moment-utc',
|
|
'transform:json-string',
|
|
'model:user',
|
|
'model:tag',
|
|
'service:ajax',
|
|
'service:clock',
|
|
'service:config',
|
|
'service:feature',
|
|
'service:ghostPaths',
|
|
'service:lazyLoader',
|
|
'service:notifications',
|
|
'service:session',
|
|
'service:settings'
|
|
]
|
|
});
|
|
|
|
// Replace this with your real tests.
|
|
it('serializes records', function () {
|
|
let record = this.subject();
|
|
|
|
let serializedRecord = record.serialize();
|
|
|
|
expect(serializedRecord).to.be.ok;
|
|
});
|
|
});
|